#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,d,a,h[200004],x[200004];
pair<ll,ll> peko[200004];
ll decr[200004],now;
ll ans=0;
int main(){
	cin>>n>>d>>a;
	for (ll i=1;i<=n;i++) cin>>peko[i].first>>peko[i].second;
	sort (peko+1,peko+1+n);
	for (ll i=1;i<=n;i++) x[i]=peko[i].first,h[i]=peko[i].second;
	for (ll i=1;i<=n;i++){
		if (now<h[i]){
			ll g=(h[i]-now+a-1)/a;
			ans+=g; 
			ll go=upper_bound(x+1,x+1+n,x[i]+2*d)-x;
			go--;
			decr[go]+=a*g;
			now+=a*g;
		}
		now-=decr[i];
	}
	cout<<ans;
}