#include <bits/stdc++.h>
using namespace std;
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
void readf(string x) {
  freopen((x + ".in").c_str(), "r", stdin);
  freopen((x + ".out").c_str(), "w", stdout);
}
void pr(string x) { freopen((x + ".in").c_str(), "w", stdout); }
int read() {
  bool min = 0;
  int result = 0;
  char ch;
  ch = getchar();
  while (1) {
    if (ch == '-') break;
    if (ch >= '0' && ch <= '9') break;
    ch = getchar();
  }
  if (ch == '-')
    min = 1;
  else
    result = ch - '0';
  while (1) {
    ch = getchar();
    if (ch < '0' || ch > '9') break;
    result = result * 10 + (ch - '0');
  }
  if (min) return -result;
  return result;
}
int main() {
  long long N, M, A, D;
  cin >> N >> M >> A >> D;
  long long x[M + 5];
  for (int i = 1; i <= M; i++) cin >> x[i];
  x[M + 1] = (1ll << 61);
  M++;
  long long c = (D / A) * A + A;
  long long cnt = 0;
  long long pro = -(1ll << 61);
  for (int i = 1; i <= M; i++) {
    if (x[i] <= pro + D) continue;
    long long a = 1;
    if (pro >= 0) {
      pro += D;
      a = pro / A + 1;
    }
    if (a > N || a * A > x[i]) {
      pro = x[i];
      cnt++;
      continue;
    }
    pro = a * A;
    long long b = (min(x[i], N * A) - pro) / c;
    cnt += b + 1;
    pro = pro + c * b;
    i--;
  }
  cout << cnt - 1 << "\n";
}
