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

int main()
{
  long long n, d, a;
  cin >> n >> d >> a;
  vector< pair<int,int> > xh(n);
  vector<long long> dm(n+1);
  for(int i=0; i<(n); ++i){
    cin >> xh[i].first >> xh[i].second;
    dm[i]=0;
  }
  dm[n]=0;
  sort(xh.begin(),xh.end());
  d += d;
  int ix = 0;
  long long dmg = 0, tot = 0;
  for(int i=0; i<(n); ++i){
    while(ix<n && xh[ix].first <= xh[i].first + d) ix++;
    dmg += dm[i];
    if( xh[i].second - dmg > 0 ){
      long long cnt1 = ( xh[i].second - dmg + (a-1) ) / a;
      tot += cnt1;
      cnt1 *= a;
      dmg += cnt1;
      dm[ix] -= cnt1;
    }
  }
  cout << tot << "\n";
  return 0;
}
