#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <time.h>
#define int long long
#define endl '\n'
#define INF 1000000000000000000
#define EPS 1e-10
#define PI 3.141592653589793238
#define all(a) a.begin(),a.end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#define fi first
#define se second
#define pb push_back
#define double long double
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;
typedef complex<double> com;
template<class T, class S> bool chmax(T &a, const S &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T, class S> bool chmin(T &a, const S &b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll n, ll m) { return (m ? gcd(m, n%m) : n); }
ll lcm(ll n, ll m) { return n / gcd(n, m)*m; }

template<class T>
class lazysegtree {
	int n;
	vector<T> data, lazy;
	vector<bool> lazyflag;
	T def;
	function<T(T, T)> operation;
	function<T(T, T)> update;
public:
	lazysegtree(size_t _n, T _def, function<T(T, T)> _operation, function<T(T, T)> _update)
		:def(_def), operation(_operation), update(_update) {
		n = 1;
		while (n < _n) {
			n *= 2;
		}
		data = vector<T>(2 * n - 1, def);
		lazy = vector<T>(2 * n - 1, def);
		lazyflag = vector<bool>(2 * n - 1, false);
	}
	void eval(int k, int l, int r) {
		if (lazyflag[k]) {
			data[k] += lazy[k];
			if (r - l > 1) {
				lazy[2 * k + 1] += lazy[k] / 2;
				lazy[2 * k + 2] += lazy[k] / 2;
				lazyflag[2 * k + 1] = lazyflag[2 * k + 2] = true;
			}
			lazy[k] = 0;
			lazyflag[k] = false;
		}
	}
	void lazychange(int a, int b, int x, int k = 0, int l = 0, int r = -1) {
		if (r < 0) r = n;
		eval(k, l, r);
		if (b <= l || r <= a) return;
		if (a <= l && r <= b) {
			lazy[k] += (r - l)*x;
			lazyflag[k] = true;
			eval(k, l, r);
		}
		else {
			lazychange(a, b, x, 2 * k + 1, l, (l + r) / 2);
			lazychange(a, b, x, 2 * k + 2, (l + r) / 2, r);
			data[k] = operation(data[2 * k + 1], data[2 * k + 2]);
		}
	}
	void change(int i, T x) {
		i += n - 1;
		data[i] = update(data[i], x);
		while (i > 0) {
			i = (i - 1) / 2;
			data[i] = operation(data[i * 2 + 1], data[i * 2 + 2]);
		}
	}
	T query(int a, int b, int k = 0, int l = 0, int r = -1) {
		if (r < 0) r = n;
		eval(k, l, r);
		if (b <= l || r <= a) return def;
		if (a <= l && r <= b) return data[k];
		int vl = query(a, b, 2 * k + 1, l, (l + r) / 2);
		int vr = query(a, b, 2 * k + 2, (l + r) / 2, r);
		return operation(vl, vr);
	}
	T operator[](int i) {
		return query(i, i + 1);
	}
};

signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(20);
	//modcalc();

	int n, d, a;
	cin >> n >> d >> a;
	vector<int> x(n), h(n);
	vector<P> p(n);
	rep(i, n) {
		cin >> x[i] >> h[i];
		h[i] = (h[i] + a - 1) / a;
		p[i].first = x[i];
		p[i].second = h[i];
	}
	sort(all(p));
	rep(i, n) {
		x[i] = p[i].first;
		h[i] = p[i].second;
	}
	p.pb(P(INF, INF));
	vector<int> ok(n);
	rep(i, n) ok[i] = upper_bound(all(x), x[i] + 2 * d) - x.begin();
	int ans = 0;
	lazysegtree<int> seg(n + 2, 0, [](int a, int b) {return a + b; }, [](int a, int b) {return b; });
	rep(i, n) seg.change(i, h[i]);
	rep(i, n) {
		if (seg[i] > 0) {
			int c = seg[i];
			seg.lazychange(i, ok[i], -c);
			ans += c;
		}
	}
	cout << ans << endl;
} 

Measured memory_bytes: 18248