#include <bits/stdc++.h>
#define int long long
#define F first
#define S second
using namespace std;
typedef pair<int,int>pii;
int n,d,a,dd;
pii x[400010];
int ans,tp;
int cha[400010];
signed main(){
	cin>>n>>d>>a;
	dd=d+d;
	for(int i=1;i<=n;i++)cin>>x[i].F>>x[i].S;
	sort(x+1,x+n+1);
	for(int l=1,r=1,cur=0;l<=n;l++){
		while(r<n&&x[r+1].F-x[l].F<=dd)r++;
		int need=(x[l].S-cha[l]*a+a-1)/a;
		if(need<0)need=0;
		ans+=need;
		
		cha[l]+=need,cha[r+1]-=need;//
		cha[l+1]+=cha[l];
		
				
//		cout<<cur<<endl;
//		for(int i=1;i<=n+1;i++)cout<<cha[i]<<' ';
//		cout<<endl;
	}
	cout<<ans<<endl;
	return 0;
}
/*
200010 1 1
1 
*/