#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const long double pi = acos(-1.0);
long long n, m, a, d;
long long tam_ciclo;
long long ans;
long long t[2000050];
long long bb(long long b, long long e, long long val) {
  if (b >= e) return b;
  long long mid = (b + e) / 2ll;
  if (val + d < a * mid) return bb(b, mid, val);
  return bb(mid + 1, e, val);
}
long long bb2(long long b, long long e, long long i, long long val) {
  if (b >= e) return b;
  long long mid = (b + e + 1ll) / 2ll;
  long long idx = i + mid * tam_ciclo;
  if (idx > n or idx * a > val) return bb2(b, mid - 1, i, val);
  return bb2(mid, e, i, val);
}
bool us[1000005];
void solve() {
  for (long long i = 1; i <= n; i++) {
    t[m++] = a * i;
  }
  sort(t, t + m);
  long long abriu = -LINF;
  for (int i = 0; i < m; i++) {
    if (abriu + d >= t[i]) continue;
    ans++;
    abriu = t[i];
  }
  cout << ans << endl;
  exit(0);
}
int main() {
  ios::sync_with_stdio(false);
  ;
  cin >> n >> m >> a >> d;
  tam_ciclo = (d) / a + 1ll;
  tam_ciclo = min(tam_ciclo, n);
  for (int i = 0; i < m; i++) cin >> t[i];
  if (n < 1000000) {
    solve();
  }
  long long abriu = -LINF;
  t[m++] = LINF;
  for (int i = 0; i < m; i++) {
    if (abriu + d >= t[i]) continue;
    long long proxima = bb(1, n + 1, abriu);
    if (proxima == n + 1 or t[i] <= proxima * a) {
      abriu = t[i];
      ans++;
      continue;
    }
    long long passados = bb2(0ll, n, proxima, t[i]);
    long long idx = proxima + passados * tam_ciclo;
    ans += passados + 1ll;
    abriu = idx * a;
    if (abriu + d >= t[i]) continue;
    ans++;
    abriu = t[i];
  }
  ans--;
  cout << ans << endl;
  return 0;
}
