//#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef signed long long ll; #define pp(...) (void)printf(__VA_ARGS__) #define For(x,to) for(x=0;x<(to);x++) #define ForAuto(x,arr) for(auto& x:arr) #define ForBeginEnd(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define All(a) (a.begin()),(a.end()) #define Zeros(a) memset(a,0,sizeof(a)) #define Minus(a) memset(a,0xff,sizeof(a)) #define PI 3.14159265 #define EPS (1e-10) #define EPS_eq(a,b) (abs((a)-(b)) < EPS) #pragma GCC diagnostic ignored "-Wconversion" //#define int long long #define INF 1000*1000 int dxy[] = {0, 1, 0, -1, 0}; typedef pair P; void pp_int(int x){ printf("%d\n", x); }; int i,j,k; ll M = 100000009; //ios::sync_with_stdio(false); //------------------------------------------------- signed main() { ll N,D,T; cin>>N>>D>>T; vector X(N); for(int i=0;i>X[i]; sort(X.begin(), X.end()); if (X[0] < 0) { ll x0 = -X[0]; for(int i=0;i=0;j--) { ll diff = X[i] - X[j]; if (diff % D == 0) { ll mx_count = diff / D - 1; if (mx_count > T){ ret += min(T, mx_count - T); } found = true; break; } } if (!found) { ret += T; } // cout<<"left:"<