//bismillahir rahmanir rahim            //Author:Fayed Anik
 
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
 
using namespace std;
//using namespace __gnu_pbds;
 
/*
template <typename T>  using ordered_set =
    tree<T, null_type, less<T>,   /// greater<T> for sorting decreasingly
    rb_tree_tag, tree_order_statistics_node_update>;
*/

#define         ll                          long  long
#define         lf                          double
#define         pb(x)                       push_back(x)
#define         ull                         unsigned long long
#define         sfl(a)                      scanf("%lld",&a)
#define         sf(a)                       scanf("%d",&a)
#define         pf(a)                       printf("%d\n",a)
#define         pfl(a)                      printf("%lld\n",a)
#define         FOR(x,n)                    for(ll x=1;x<=n;++x)
#define         pii                         pair< ll , ll >
#define         SET(m)                      memset(m, 1,sizeof m)
#define         RESET(m)                    memset(m,0,sizeof m)
#define         mp(a,b)                     make_pair(a,WWb)
#define         mod                         1000000007
#define         INF                         1e17
#define         f1                          first
#define         f2                          second
#define         all(v)                      v.begin(),v.end()
#define         PI                          acos(-1)
#define         printminusone               printf("-1\n")
#define         bug                         printf("bug")
#define         FILEIN                      freopen("in.txt","r",stdin)
#define         FILEOUT                     freopen("out.txt","w",stdout)
 
//ll SET(ll mask,ll pos){ return mask = (mask | (1ll<<pos)); }
//ll RESET(ll mask,ll pos){ return mask = mask & ~(1ll<<pos); }
//bool CHECK(ll mask,ll pos) { return (bool) (mask & (1ll<<pos)); }
//priority_queue <ll, vector<ll>, greater<ll> > pq;

#define N 200005

ll tree[4*N],lazy[4*N],n;
pii a[N];
void pushup(ll nd,ll b,ll e){
    if(b!=e){
        lazy[2*nd]+=lazy[nd];
        lazy[2*nd+1]+=lazy[nd];
    }
    else{
        tree[nd] += lazy[nd];
    }
    lazy[nd]=0;
}

void update(ll nd,ll b,ll e,ll i,ll j,ll val){
    if(lazy[nd]){
        pushup(nd,b,e);
    }
    ll mid=(b+e)/2;
    if(i>e or j<b) return;
    if(b>=i and e<=j){
        lazy[nd] += val;
        return;
    }
    update(2*nd,b,mid,i,j,val);
    update(2*nd+1,mid+1,e,i,j,val);
    tree[nd]=tree[2*nd]+tree[2*nd+1];
}

ll query(ll nd,ll b,ll e,ll i,ll j){
    if(lazy[nd]){
        pushup(nd,b,e);
    }
    ll mid=(b+e)/2;
    if(i>e or j<b){
        return 0;
    }
    if(b>=i and e<=j){
        return tree[nd];
    }
    return query(2*nd,b,mid,i,j)+query(2*nd+1,mid+1,e,i,j);
}

ll BS(ll pos,ll dis){
    ll lw=pos,hi=n,mid,ans=-1;
    while(lw<=hi){
        mid=(lw+hi)>>1ll;
        if(a[mid].f1>dis){
            hi=mid-1;
        }
        else{
            ans=mid;
            lw=mid+1;
        }
    }
    return ans;
}
int main(){
    ll d,x;
    sfl(n),sfl(d),sfl(x);
    for(ll i=1;i<=n;i++){
        sfl(a[i].f1);
        sfl(a[i].f2);
    }
    sort(a+1,a+n+1);
    ll ans=0,pos;
    for(ll i=1;i<=n;i++){
        ll val=a[i].f2-query(1,1,n,i,i);
        if(val>0){
            ll t=val/x;
            if(val%x!=0) t++;
            ans += t;
            pos=BS(i,a[i].f1+2*d);
            //cout << pos << endl;
            if(pos!=-1){
                update(1,1,n,i+1,pos,t*x);
            }
            //cout << ans << endl;
        }
    }
    pfl(ans);
    return 0;
}

Measured memory_bytes: 14592