#include #define REP(i, x, n) for(int i = x; i < (int)(n); i++) #define rep(i, n) REP(i, 0, n) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define F first #define S second #define mp make_pair using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair P; int main() { // ios_base::sync_with_stdio(false); ll N, D, T; cin >> N >> D >> T; vector x(N); rep(i, N) cin >> x[i]; ll ans = 0; rep(i, N) { ll l1 = x[i] - D * T; ll r1 = x[i] + D * T; bool flg = true; rep(j, i) { if(abs(x[i] - x[j]) % D) continue; ll l2 = x[j] - D * T; ll r2 = x[j] + D * T; if(l2 <= l1 && r1 <= r2) { flg = false; break; } else if(l1 <= r2) { l1 = r2 + D; } else if(r1 >= l2) { r1 = l2 - D; } if(l1 > r1) { flg = false; break; } } if(flg) ans += (r1 - l1) / D + 1; } cout << ans << endl; return 0; }