#include<bits/stdc++.h>
using namespace std;
const long long maxn=200010LL;
long long n,d,a,xx,yy,res=0LL,pre[maxn];
pair<long long,long long> v[maxn];
long long num(long long x)
{
	long long ans=x/a;
	if(x%a) ++ans;
	return ans;
}
int main()
{
	cin>>n>>d>>a;
	for(long long i=1LL;i<=n;i++) cin>>v[i].first>>v[i].second;
	sort(v+1LL,v+1LL+n);
	v[n+1]=make_pair(1e18,1e18);
	for(long long i=1LL;i<=n;i++)
	{
		pre[i]+=pre[i-1];
		long long di=v[i].second-pre[i];
		if(di<=0LL) continue;
		long long tmp=v[i].first+2*d; 
		long long ind=upper_bound(v+1LL,v+2LL+n,make_pair(tmp+1,0LL))-v-1;
		long long tim=num(di);
		res+=tim;
		long long att=tim*a;
		pre[i]+=att;
		pre[ind+1]-=att;
	}
	cout<<res<<endl;
	return 0;
}