#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m, a, d;
  cin >> n >> m >> a >> d;
  vector<long long> line(m);
  for (auto& t : line) cin >> t;
  line.push_back(LINF);
  long long ans = 0, last = 0;
  for (int i = 0; i < m + 1; i++) {
    long long counted = last / a;
    long long t = line[i];
    if (last >= t) continue;
    long long time_first_employee = max(a, (last / a + 1) * a);
    long long time_last_employee = min(n * a, (t / a) * a);
    if (time_first_employee <= t and
        time_last_employee >= time_first_employee) {
      long long employees =
          min((time_last_employee - time_first_employee) / a + 1, n - counted);
      long long period = (d + a) / a;
      long long cycles = (employees + period - 1) / period;
      ans += cycles;
      last = time_first_employee + (cycles - 1) * a * period + d;
    }
    if (last >= t)
      continue;
    else
      ans++;
    last = t + d;
  }
  ans--;
  cout << ans << '\n';
  return 0;
}
