#include <bits/stdc++.h>   using namespace std;   const long double pi = acos(-1);   const int N = 2e5;   long long gi() {     long long w = 0;     bool q = 1;     char c = getchar();     while ((c <  0  || c >  9 ) && c !=  - ) c = getchar();     if (c ==  - ) q = 0, c = getchar();     while (c >=  0  && c <=  9 ) w = w * 10 + c -  0 , c = getchar();     return q ? w : -w;   }   int main() {     long long n = gi(), m = gi(), a = gi(), d = gi(), last = 0, k, x, y, ans = 0,               u = d / a + 1;     while (m--) {       k = gi();       x = max(last / a + 1, 1LL);       y = min(k / a, n);       if (x <= y) {         ans += (y - x) / u + 1;         last = (x + (y - x) / u * u) * a + d;       }       if (last < k) last = k + d, ans++;     }     x = max(last / a + 1, 1LL);     if (x <= n) ans += (n - x) / u + 1;     cout << ans << endl;     return 0;   }   