#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int N, D, A;
pair<int, int> p[maxn];
int main() {
	cin>>N>>D>>A;
	for(int i = 1; i <= N; ++i) {
		cin>>p[i].first>>p[i].second;
		p[i].second = (p[i].second + A - 1) / A;
	}
	sort(p + 1, p + N + 1);
	int cnt = 0;
	long long ans = 0;
	for(int i = 1, j = 1; i <= N; ++i) {
		while(p[i].first - p[j].first > 2 * D) {
			cnt -= p[j].second;
			++j;
		}
		ans += max(0, p[i].second - cnt);
		p[i].second = max(0, p[i].second - cnt);
		cnt += p[i].second;
	}
	cout<<ans<<endl;
	return 0;
}