#include <iostream>
#include <cstdio>
#include <algorithm>
#define F first
#define S second
using namespace std;
typedef long long ll;

ll n, d, a, pos, k, ans, cnt[200005];
pair<ll, ll> b[200005];

int main() {
	ll i, j;
	cin >> n >> d >> a;
	for(i=0; i<n; i++) scanf("%lld%lld", &b[i].F, &b[i].S);
	sort(b, b+n);
	for(i=j=0; i<n; i++) {
		for(; j<n && b[j].F <= b[i].F + 2*d; j++);
		j--;
		k = max(0LL, (b[i].S - cnt[i]*a + a-1) / a);
		ans += k;
		cnt[i] += k;
		cnt[j+1] -= k;
		cnt[i+1] += cnt[i];
	}
	cout << ans;
	return 0;
}
