#include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define LOOP(i) while(i--)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto pitr=c.begin();pitr!=c.end();++pitr){cout<<*pitr;if(next(pitr,1)!=c.end())cout<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){ T x; cin >> x; return (x); }
template<typename T=int,typename C=vector<T>>
C vecin(int N){ C x(N);REP(i,N){ x[i]=in<T>(); }return move(x); }

void vout(){ cout << endl; }
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){ cout << ' ' << h;vout(forward<Tail>(t)...); }
void out(){ cout << endl; }
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){ cout << h;vout(forward<Tail>(t)...); }

template<typename T>
class RangeQuery{
public:
	virtual T CalculateCost(T left,T right)=0;
	virtual void EvaluateElement(T& left,T right)=0;
	virtual void EvaluateLazy(T& left,T right)=0;
	virtual void UpdateLazy(T& left,T right,T vleft,T vright)=0;
};

template<typename T>
class RangeAddQuery:public RangeQuery<T>{
public:
	T CalculateCost(T left,T right){ return left+right; }
	void EvaluateElement(T& left,T right){ left+=right; }
	void EvaluateLazy(T& left,T right){ left+=right/2; }
	void UpdateLazy(T& left,T right,T vleft,T vright){ left+=(vright-vleft)*right; }
};

// 遅延セグメント木を構築してある区間の値を高速で求める
// 要素が変更された時に関連するノードを変更する
template<typename T>
class SegmentTree{
	T def_value;
	int last_num;
	vector<T> element,lazy;
	vector<bool> lazy_flag;
	unique_ptr<RangeQuery<T>> range_query;
public:
	SegmentTree(vector<T>& vec,T def):def_value(def){
		int N=vec.size();
		last_num=1;
		while(last_num<N) last_num <<= 1;
		element.resize(2*last_num-1,def);
		lazy.resize(2*last_num-1,0);
		lazy_flag.resize(2*last_num-1,false);

		range_query = make_unique<RangeAddQuery<T>>();

		for(int i=0;i<N;i++){
			element[i+last_num-1] = vec[i];
		}
		for(int i=last_num-2;i>=0;i--){
			element[i] = range_query->CalculateCost(element[2*i+1],element[2*i+2]);
		}
	}
	void Evaluate(int index,int left,int right){
		if(!lazy_flag[index]) return;
		range_query->EvaluateElement(element[index],lazy[index]);
		if(right-left>1){
			range_query->EvaluateLazy(lazy[2*index+1],lazy[index]);
			range_query->EvaluateLazy(lazy[2*index+2],lazy[index]);
			lazy_flag[2*index+1] = lazy_flag[2*index+2] = true;
		}
		lazy[index] = 0;
		lazy_flag[index] = false;
	}
	void UpdateRange(int left,int right,T x,int index=0,int vleft=0,int vright=-1){
		if(vright<0) vright = last_num;
		Evaluate(index,vleft,vright);

		if(vright<=left || right<=vleft) return;
		if(left<=vleft && vright<=right){
			range_query->UpdateLazy(lazy[index],x,vleft,vright);
			lazy_flag[index] = true;
			Evaluate(index,vleft,vright);
		}
		else{
			UpdateRange(left,right,x,2*index+1,vleft,(vleft+vright)/2);
			UpdateRange(left,right,x,2*index+2,(vleft+vright)/2,vright);
			element[index] = range_query->CalculateCost(element[2*index+1],element[2*index+2]);
		}
	}
	// left<right
	T Find(int left,int right,int index=0,int vleft=0,int vright=-1){
		if(vright<0) vright = last_num;
		if(vright<=left || right<=vleft) return def_value;

		Evaluate(index,vleft,vright);
		if(left<=vleft && vright<=right) return element[index];

		T res_left = Find(left,right,2*index+1,vleft,(vleft+vright)/2);
		T res_right = Find(left,right,2*index+2,(vleft+vright)/2,vright);
		return range_query->CalculateCost(res_left,res_right);
	}
	T FindLeftmostValue(int left,int right,T value,int index=0,int vleft=0,int vright=-1){
		if(vright<0) vright = last_num;
		if(vright<=left || right<=vleft || element[index]!=value) return -1;

		if(index>=last_num-1) return index-(last_num-1);

		T res_left = FindLeftestValue(left,right,value,2*index+1,vleft,(vleft+vright)/2);
		if(res_left!=-1) return res_left;
		return FindLeftmostValue(left,right,value,2*index+2,(vleft+vright)/2,vright);
	}
};

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout<<fixed<<setprecision(10);

	ll N=in(),D=in(),A=in();
	vector<pair<ll,ll>> S(N);
	vector<ll> E(N),H(N);
	REP(i,N){
		S[i].first=in(),S[i].second=in();
	}
	sort(ALL(S),PAIRCOMP(first,<));
	REP(i,N){
		E[i]=S[i].first,H[i]=S[i].second;
	}
	vector<ll> R(N);
	REP(i,N){
		ll P=E[i]+2LL*D+1LL;
		auto res = lower_bound(ALL(E),P);
		R[i] = distance(E.begin(),res)-i;
	}
	SegmentTree<ll> tree(H,0);
	ll sum = 0;
	REP(i,N){
		ll V=tree.Find(i,i+1);
		if(V>0){
			ll K=(V+A-1)/A;
			tree.UpdateRange(i,i+R[i],-A*K);
			sum += K;
		}
	}

	out(sum);
	return 0;
}


Measured memory_bytes: 16384