#include <bits/stdc++.h>
using namespace std;using L = long long;using V= pair<L,L>;
#define F first
#define S second
#define I XH[i]
#define R for(L i=0;i<N;i++)
L N,D,A,n=0,r=0,t;V XH[200005];queue<V>P;
int main() {cin>>N>>D>>A;R{cin>>I.F>>I.S;}sort(XH,XH+N);R{while(!P.empty()&P.front().F<I.F){n-=P.front().S;P.pop();}I.S-=n;if(I.S>0){t=(I.S+A-1)/A;r+=t;P.push({I.F+2*D,t*A});n+=t*A;}}cout<<r;} 