#include <bits/stdc++.h>
using namespace std;
long long n, m, t, d, las, ans, len, ds;
long long tmp1, tmp2;
long long a[100005];
int main() {
  scanf("%I64d%I64d%I64d%I64d", &n, &m, &t, &d);
  ds = d / t + 1;
  for (int i = 1; i <= m; ++i) scanf("%I64d", &a[i]);
  sort(a + 1, a + m + 1);
  las = ans = 0;
  for (int i = 1; i <= m; ++i) {
    if (a[i] <= las) continue;
    tmp1 = min(a[i] / t, n);
    tmp2 = min(las / t, n);
    len = tmp1 - tmp2;
    ans += len / ds + (len % ds == 0 ? 0 : 1);
    if (len) {
      las = t * (tmp1 + 1) + d;
      if (!(len % ds))
        las -= t * ds;
      else
        las -= t * (len % ds);
    }
    if (a[i] > las) {
      las = a[i] + d;
      ++ans;
    }
  }
  tmp1 = n;
  tmp2 = min(las / t, n);
  len = tmp1 - tmp2;
  ans += len / ds + (len % ds == 0 ? 0 : 1);
  printf("%I64d\n", ans);
  return 0;
}
