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

typedef pair<int,int> P;
int n,d,a,now,ans;
priority_queue<P,vector<P>,greater<P>> que;

signed main(){
  cin>>n>>d>>a;
  while(n--){
    int x,h;cin>>x>>h;
    que.push(P(x,h));
  }
  while(que.size()){
    P p=que.top();que.pop();
    int x=p.first,h=p.second;
    if(h<0)now+=h;
    if(h-now>0){
      int A=(h-now-1)/a+1;
      ans+=A;now+=A*a;
      que.push(P(x+d*2+1,-A*a));
    }
  }
  cout<<ans<<endl;
}
