#include<bits/stdc++.h>
typedef  long long ll;
using namespace std;
const int maxn = 2e5 + 100;
const int inf = 2e9;
int a[maxn];
int main() {
	map<int, int>m;
	ios::sync_with_stdio(0);
	ll n, D, A;
	cin >> n >> D >> A;
	for (int i = 1, x; i <= n; i++)
		cin >> a[i] >> x, m[a[i]] = x;
	sort(a + 1, a + 1 + n);
	ll ans = 0, j = 1;
	for (int i = 1; i <= n; i++) {
		int Max = a[i] + 2 * D;
		while (j < n && a[j + 1] <= Max) {
			m[a[j + 1]] += ans * A;
			j++;
		}
		m[a[i]] -= ans * A;
		ll num = m[a[i]] / A + (m[a[i]] % A == 0 ? 0 : 1);
		if (m[a[i]] > 0)
			ans += num;
	}
	cout << ans << endl;
	return 0;
}
