#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define x first
#define h second

int main() {
  ios::sync_with_stdio(0); cin.tie(0);
  ll n, w, dmg;
  cin >> n >> w >> dmg;
  w = w*2+1;
  vector<pair<ll,ll>> p;
  for (int i = 0; i < n; i++) {
    ll x, h;
    cin >> x >> h;
    p.emplace_back(x, (h+dmg-1)/dmg);
  }
  sort(p.begin(), p.end());
  vector<ll> will(n+1);
  int j = 0;
  ll acc = 0;
  ll ans = 0;
  for (int i = 0; i < n; i++) {
    while (j < n && p[j].x-p[i].x < w) j++;
    acc += will[i];
    ll v = max(p[i].h-acc, 0ll);
    ans += v;
    acc += v;
    will[j] -= v;
  }
  cout << ans << endl;
}
