#include<iostream>
#include<algorithm>
#define int long long
using namespace std;
signed main(){
	int n,d,a;
	cin>>n>>d>>a;
	pair<int,int>m[n+1LL];
	for(int i=1LL;i<=n;++i){
		cin>>m[i].first>>m[i].second;
		m[i].second=(m[i].second+a-1LL)/a;
	}
	sort(m+1LL,m+n+1LL);
	int j=1LL,sum=0LL,tot=0LL;
	int bomb[n+1LL];
	for(int i=1LL;i<=n;++i){
		while(j<i&&m[i].first-m[j].first>d*2){
			sum-=bomb[j];
			++j;
		}
		bomb[i]=max(m[i].second-sum,0LL);
		sum+=bomb[i];
		tot+=bomb[i];
	}
	cout<<tot<<endl;
	return 0;
}