#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const long long inf = 1LL << 60;
const int N = 100010;
long long n, m, a, d, t[N], ans;
long long read() {
  long long w(0), f(0);
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') f = 1, c = getchar();
  while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar();
  return f ? -w : w;
}
int main() {
  n = read(), m = read(), a = read(), d = read();
  for (int i = 1; i <= m; ++i) t[i] = read();
  sort(t + 1, t + m + 1);
  long long now(0), t1, t2, t3, num = d / a + 1, po(0), tmp, tp;
  for (int i = 1; i <= m; ++i) {
    if (t[i] <= now) continue;
    po = now / a;
    if (po >= n) {
      now = t[i] + d;
      ans++;
      continue;
    }
    t1 = (po + 1) * a;
    if (t1 >= t[i]) {
      ans++, now = t[i] + d;
    } else {
      t2 = t[i] / a;
      if (t2 >= n) {
        tmp = n - po;
        tp = tmp / num;
        if (tmp % num) tp++;
        ans += tp, now = (po + (tp - 1) * num + 1) * a + d;
        if (now < t[i]) ans++, now = t[i] + d;
      } else {
        tmp = (t2 - po);
        tp = tmp / num;
        if (tmp % num) tp++;
        ans += tp, now = (po + (tp - 1) * num + 1) * a + d;
        if (now >= t[i]) continue;
        ans++, now = t[i] + d;
      }
    }
  }
  po = now / a;
  if (po < n) {
    ans += (n - po) / num;
    if ((n - po) % num) ans++;
  }
  printf("%I64d\n", ans);
  return 0;
}
