#include <iostream>
#include <vector>

using namespace std;
 
int main(){

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

  int n, m, k;
  int isk;
   
  cin >> n >> m >> k;
  
  vector<bool> a(k, false);
  
  cin >> isk;

  bool iski[k];
  int tmp;

  memset(iski, false, sizeof(iski));
  
  for(int i = 0; i < isk; i++){
    cin >> tmp;
    iski[tmp - 1] = true;
    
  }

  int st[m];         
  memset(st, 0, sizeof(st));

  int i = 0;

  while (true)
  {
    if (i > m) break;
    if (i >= n) break;

    bool found = false;
   
    for(int j = 0; j < k; j++)
    {

      if(a[st[i%m] + j] && iski[j])
      {
        st[i%m]++;
        found = true;
        break;
      }
    }

    if (found) continue;
   
    int oldsize = st[i%m];

    st[i%m] += k;
    a.resize(st[i%m]);

    for(int j = 0; j < k; j++)
    {
      if(iski[j]) 
        a[oldsize + j] = true;
    }

    i++;
  }

  st[0] -=k;

  int len = a.size() - k;
  int amnt = n / m;
             
  int res = (amnt) * len + st[n%m - 1];

  if(n <= m)                           
    cout << a.size() << endl;
  else 
    cout << res << endl;
             
  return 0;
}

