#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
using ll = long long;
const ll INF=1e15;
#define F first
#define S second
#define I XH[i]


ll N,D,A,now=0,res=0,t;
pair<ll,ll>XH[200005];
queue<pair<ll,ll> >P;
int main() {
	
	cin>>N>>D>>A;
	for(ll i=0;i<N;i++){
		cin>>I.F>>I.S;
	}
	sort(XH,XH+N);
	for(ll i=0;i<N;i++){
		while(!P.empty()&&P.front().F<I.F){
			now-=P.front().S;
			P.pop();
		}

		I.S-=now;
		
		if(I.S>0){
			t=(I.S+A-1)/A;
			res+=t;
			P.push({I.F+2*D,t*A});
			now+=t*A;
		}
	}
	cout<<res;
} 
