#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& out, const vector<T>& vec) {
  out << "[";
  for (int x : vec) out << x << ", ";
  out << "]";
  return out;
}
int main() {
  int M;
  long long N, A, D;
  cin >> N >> M >> A >> D;
  vector<long long> T;
  for (int m = 0; m < M; ++m) {
    long long t;
    cin >> t;
    T.push_back(t);
  }
  T.push_back(N * A);
  ++M;
  sort(T.begin(), T.end());
  long long last = -D - 1;
  long long ans = 0;
  for (int i = 0; i < M;) {
    while (i < M && last >= T[i]) {
      ++i;
    }
    if (i == M) {
      break;
    }
    last = max(last, 0LL);
    long long u = last / A + 1;
    if (u < N && u * A < T[i]) {
      long long v = D / A + 1;
      long long w = ((T[i] - 1) / A - u) / v + 1;
      last = A * (u + v * (w - 1)) + D;
      ans += w;
    }
    if (last < T[i]) {
      last = T[i] + D;
      ++ans;
    }
  }
  cout << ans << '\n';
}
