
#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <ctime>
#include <cassert>

#define  max_l    10
#define  max_Len  (int)1e6
#define  max_n    1000

using namespace std;

int n, m, k, l;
int a[max_l], b[max_l];
int table[max_Len][max_l];
bool isAns[max_Len];

int init_prg() {
   scanf("%d%d%d%d", &n,&m,&k,&l);
   for (int i = 0; i < l; ++i)
      scanf("%d", &a[i]);
   memset(isAns,false,sizeof(isAns));
   return 0;
}

bool check(int n) {
   for (int i = 0; i < n; ++i)
      for (int j = 0; j < l; ++j)
         if (binary_search(table[i],table[i]+l,table[n][j]))
            return false;
   return true;
}

int main() {

   freopen("b.in","r",stdin);
   freopen("b.out","w",stdout);

   init_prg();

   for (int i = 0; i < l-1; ++i) {
      b[i] = abs(a[i]-a[i+1]);
//      cout << b[i] << " ";
   }
//   cout << "\n_____________\n";

   for (int i = 0; i < l; ++i)
      table[0][i] = a[i];
   
   for (int i = 1; i < max_n; ++i) {
      
      for (int j = 0; j < l; ++j)
         table[i][j] = table[i-1][j]+1;
      
      if (!check(i)) {
         table[i][0] = table[i-1][l-1]+1;
         for (int j = 1; j < l; ++j)
            table[i][j] = table[i][j-1]+b[j-1];
      }

      /*for (int j = 0; j < l; ++j)
         cout << table[i][j] << " ";
      cout << "\n";*/
   }

   int ans = table[n-1][l-1];

   while (a[l-1] < k) {
      ++a[l-1];
      ++ans;
   }

   cout << ans;


   return 0;
}
