#include <bits/stdc++.h>

using namespace std;

const int OO = 1e9;
const double EPS = 1e-9;

#define ndl cout << '\n'
#define sz(v) int(v.size())
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define present(a, x) (a.find(x) != a.end())
#ifdef LOCAL
#define db(...) ({cout << "> Line " << __LINE__  \
		<< ": "; _db(#__VA_ARGS__, __VA_ARGS__);})
#define RNG() rng()
#else
#define db(...) true
#define RNG() true
#endif

template<class T>
void _db(const char *dbStr, T e) {
	cout << dbStr << " = " << e << endl;
}
template<class T, class... L>
void _db(const char *dbStr, T e, L... r) {
  while(*dbStr != ',') cout << *dbStr++;
  cout << " = " << e << ','; _db(dbStr + 1, r...);
}
template<class S, class T>
ostream& operator<<(ostream& o, const map<S, T>& v) {
	o << "["; int i = 0;
	for (const pair<S, T>& pr : v) o << (!i++ ? "" : ", ") << "{"
	<< pr.fs << " : " << pr.sc << "}"; return o << "]";
}
template<template <class, class...> class S, class T, class... L>
ostream& operator<<(ostream& o, const S<T, L...>& v) {
	o << "["; int i = 0;
	for (const auto& e : v) o << (!i++ ? "" : ", ") << e;
	return o << "]";
}
template<class S, class T>
ostream& operator<<(ostream& o, const pair<S, T>& pr) {
	return o << "(" << pr.fs << ", " << pr.sc << ")";
}
ostream& operator<<(ostream& o, const string& s) {
	for (const char& c : s) o << c;
	return o;
}

template<class T> using V = vector<T>;
template<class T> using VV = V<V<T>>;
template<class T> using VVV = VV<V<T>>;
using ll = long long;
using pii = pair<int, int>;
using vi = V<int>;
using vii = V<pii>;
using vvi = VV<int>;
using mii = map<int, int>;
using umii = unordered_map<int, int>;
using si = set<int>;
using usi = unordered_set<int>;


struct FenwickTree {
    vector<int> bit;
    int n, LOGN;
    void init(int _n) {
    	n = _n;
		LOGN = log2(n) + 1;
		bit.assign(n + 1, 0);
    }
    FenwickTree(int _n) {
        init(_n);
    }
    FenwickTree(vector<int> a) {
    	init(sz(a));
    	for (int i = 0; i < n; ++i)
            add(i + 1, a[i]);
    }
    int sum(int idx) {
        int ret = 0;
        for (; idx > 0; idx -= idx & -idx)
            ret += bit[idx];
        return ret;
    }
    int sum(int l, int r) {
        return sum(r) - sum(l - 1);
    }
    void add(int idx, int delta) {
        for (; idx <= n; idx += idx & -idx)
            bit[idx] += delta;
    }
    // for range updates and (only) point queries
    void rangeAdd(int l, int r, int val) {
        add(l, val);
        add(r + 1, -val);
    }
    int pointQuery(int idx) {
        int ret = 0;
        for (; idx > 0; idx -= idx & -idx)
            ret += bit[idx];
        return ret;
    }
    // returns first position p for which sum(1, p) >= v
    // sum(1, i) must be monotonic w.r.t. i
    int bitSearch(int v) {
    	int sum = 0;
    	int pos = 0;
		for (int i = LOGN; i >= 0; i--)
			if (pos + (1 << i) <= n && sum + bit[pos + (1 << i)] < v) {
				sum += bit[pos + (1 << i)];
				pos += (1 << i);
			}
		return pos + 1;
    }
};



int main() {
	#ifdef LOCAL
	auto stTime = clock();
//	freopen("in.txt", "r", stdin);
	mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
	#endif
	ios::sync_with_stdio(false);
	cout.precision(10);
	cin.tie(0);

	int N;
	ll D, A;
	cin >> N >> D >> A;
	V<pair<ll, ll>> mons(N);

	si s;

	for (int i = 0; i < N; ++i) {
		cin >> mons[i].fs >> mons[i].sc;
		s.insert(mons[i].fs);
	}

	V<ll> ord;
	ord.pb(-1);
	int id = 1;
	mii M;

	for (auto& elem : s) {
		ord.pb(elem);
		M[elem] = id++;
	}

	ord.pb(1e11);

	sort(mons.begin(), mons.end());

	FenwickTree bit(N);

	for (int i = 0; i < N; ++i) {
		bit.rangeAdd(M[mons[i].fs], M[mons[i].fs], (mons[i].sc + A - 1) / A);
	}


	ll ans = 0;

	for (int i = 0; i < N; ++i) {
		ll pos = mons[i].fs;
		int l = M[mons[i].fs];
		int r = upper_bound(ord.begin(), ord.end(), pos + 2 * D) - ord.begin();
		ll need = bit.pointQuery(l);
		if (need <= 0)
			continue;
		ans += need;
		bit.rangeAdd(l, r - 1, -need);
	}

	cout << ans << '\n';



	#ifdef LOCAL
	cout << "\n\n\nExecution time: " <<
		(clock() - stTime) * 1e3 / CLOCKS_PER_SEC << " ms" << endl;
	#endif
    return 0;
}


Measured memory_bytes: 24432