#include <bits/stdc++.h>
using namespace std;
const long long int maxN = 1e5 + 326;
long long int N, a, M, vals[maxN], d;
inline long long int stp(long long int x) {
  long long int A = *upper_bound(vals, vals + M + 2, x + d);
  long long int B = (x + d) / a * a + a;
  if (x + d >= N * a) return A;
  return (A < B ? A : B);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  cin >> N >> M >> a >> d;
  for (long long int i = 0; i < M; i++) {
    cin >> vals[i];
  }
  vals[M] = (N * a > vals[M - 1] ? N * a : vals[M - 1]);
  vals[M + 1] = 5e18 + 326;
  long long int ans = 0;
  long long int cur = (vals[0] < a ? vals[0] : a), cov = (d + a) / a;
  for (long long int i = 0; i <= M; i++) {
    if (vals[i] < cur) continue;
    ans++;
    cur = stp(cur);
    if (vals[i] < cur) continue;
    if (cur <= N * a) {
      long long int numA =
          (0LL > (vals[i] / a < N ? vals[i] / a : N) - (cur - 1) / a -
                       (vals[i] % a == 0 && vals[i] <= N * a) - 1
               ? 0LL
               : (vals[i] / a < N ? vals[i] / a : N) - (cur - 1) / a -
                     (vals[i] % a == 0 && vals[i] <= N * a) - 1);
      ans += numA / cov;
      cur += (numA / cov) * cov * a;
    }
    while (vals[i] >= cur) {
      ans++;
      cur = stp(cur);
    }
  }
  cout << ans << endl;
}
