//includes
#include<iostream>
#include<vector>
#include<set>
#include<tuple>
#include<algorithm>
#include<cmath>
#include<string>
#include<stack>
#include<map>
#include<queue>
#include<iomanip>
#include<numeric>
#include<assert.h>
#include<cstring>
#include<unordered_map>
#include<bitset>

//macros and consts
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define all(a) (a).begin(),(a).end()
#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define FORE(i,a) for(auto &i : a)
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define accm accumulate
#define Fi first
#define Se second
#define INF 1e9
#define llINF (1LL<<60)
#define mINF -1e9
#define mllINF -(1LL<<60)
#define endl "\n"
#define CONT continue
#define BRK break
#define modulo(n, m) (((n)%(m)+(m))%m)

//shorter types
using namespace std;
using ll = long long;
using vi = std::vector<int>;
using vc = std::vector<char>;
using vll = std::vector<long long>;
using vs = std::vector<string>;
using Mi = map<int,int>;
using Mll = map<ll,ll>;
using UMi = unordered_map<int,int>;
using UMll = unordered_map<ll,ll>;
using Pi = pair<int,int>;
using Pll = pair<ll,ll>;
using vPi = vector<Pi>;
using vPll = vector<Pll>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<ll>>;
using vvc = vector<vector<char>>;
using vvs = vector<vector<string>>;
using pqgi = priority_queue<int,vector<int>,greater<int>>;
using pqsi = priority_queue<int,vector<int>,less<int>>;
using pqgll = priority_queue<int,vector<int>,greater<int>>;
using pssll = priority_queue<int,vector<int>,less<int>>;
template<class T>
using vec = vector<T>;
#define int long long

//here begins your code

template <class T> struct BIT{
	vector<T> data[2];
	T unity_sum = 0;

	BIT(int n){
		init(n);
	}
	void init(int n){
		for(int iter = 0 ; iter < 2 ; iter++){
			data[iter].assign(n + 1, unity_sum);
		}
	}

	void sub_add(int p, int a, T x){
		for(int i = a ; i < (int)data[p].size() ; i+= i&(-i)){
			data[p][i] = data[p][i] + x;
		}
	}

	void add(int a, int b, T x){
		sub_add(0,a,x * -(a - 1));
		sub_add(1,a,x);
		sub_add(0,b,x*(b-1));
		sub_add(1,b,x*(-1));
	}
	T sub_sum(int p,int a){
		T res = unity_sum;
		for(int i = a; i > 0 ; i -= i & (-i)){
			res = res + data[p][i];
		}
		return res;
	}
	T sum(int a, int b){
        return sub_sum(0, b - 1) + sub_sum(1, b - 1) * (b - 1) - sub_sum(0, a - 1) - sub_sum(1, a - 1) * (a - 1);
	}
};

int N,D,A;
vector<int> X;
vector<int> H;

int solve(){
	vector<int> ids(N);
	for(int i = 0 ; i < N ; i++){
		ids[i] = i;
	}
	sort(ids.begin(),ids.end(), [&](int i, int j){
		return X[i] < X[j];
	});
	vector<int> nX(N),nH(N);
	for(int i = 0 ; i < N ; i++){
		nX[i] = X[ids[i]], nH[i] = H[ids[i]];
	}
	X = nX;
	H = nH;


	BIT<int> bit(N + 10);
	for(int i = 0 ; i < N ; i++){
		bit.add(i+1,i+2,H[i]);
	}
	int res = 0;
	for(int i = 0 ; i < N; i++){
		int cur = bit.sum(i+1,i+2);
		if(cur <= 0){
			continue;
		}
		int need = (cur + A - 1) / A;
		int right = X[i] + D * 2;
		int id = upper_bound(X.begin(),X.end(),right) - X.begin();
		bit.add(i + 1, id + 1 , -need * A);
		res += need;
	}
	return res;
}


signed main(){
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);

  cin >> N >> D >> A;
  X.resize(N);
  H.resize(N);

  for(int i = 0 ; i < N ; i++){
  	cin >> X[i] >> H[i];
  }

  cout << solve() << endl;
  //check types
  //do not eb if you resize
  //resize before you access by idx
  return 0;
} 

Measured memory_bytes: 11264