#include<cstdio>
#include<algorithm>
typedef long long ll;
using namespace std;
struct Z{
	ll x,h;
	int operator<(const Z&a)const{
		return x<a.x;
	}
}A[200001];
int i,j,n,d,a;
ll r,t,f[200001];
void add(int i,ll x){for(;i;i-=i&-i)f[i]+=x;}
ll val(int i){ll r=0;for(;i<=n;i+=i&-i)r+=f[i];return r;}
int main()
{
	scanf("%d%d%d",&n,&d,&a);
	for(;++i<=n;A[i].h=A[i].h/a+(A[i].h%a>0))scanf("%lld%lld",&A[i].x,&A[i].h);
	sort(A+1,A+n+1);
	for(i=1;i<=n;++i)if((t=A[i].h-val(i))>0)
	{
		j=upper_bound(A+1,A+n+1,(Z){A[i].x+d+d,0})-A-1;
		r+=t,add(j,t);
	}
	printf("%lld",r);
}