#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
using ll = long long;
using P = pair<ll, ll>;
constexpr int MX = 200005;
int n,d,a,x,h;
long long ans,ac;
queue<P> qu;
P p[MX];
int main(){
	scanf("%d%d%d", &n, &d, &a);
	rep(i,n){
		scanf("%d%d", &x, &h);
		p[i] = P{x,h};
	}
	sort(p,p+n);
	rep(i,n){
		while(!qu.empty() && qu.front().first < p[i].first){
			ac -= qu.front().second;
			qu.pop();
		}
		if(ac < p[i].second){
			ll t = (p[i].second - ac - 1) / a + 1;
			ans += t;
			ac += a * t;
			qu.push(P{p[i].first+d*2,a*t});
		}
	}
	printf("%lld\n", ans);
}