#include<bits/stdc++.h>
#include<iostream>
#include<stdio.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define fr(i,j,n)   for(int i=j;i<(n);++i)
#define bk(i,j,n)   for(int i=j;i>=n;--i)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define endl "\n"
#define MOD 1000000007
#define here(s)      cout<<s<<endl;
#define run ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define ordered_set tree<ll , null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update>


typedef long long ll;

ll n,d,a;
ll x[200002],h[200002];
ll arr[300002];
vector<pair<ll,ll> > v;

int main()
{
   // run;
    ll n,d,a;
    cin>>n>>d>>a;
    fr(i,0,n)
    {
        cin>>x[i]>>h[i];
        v.pb({x[i],h[i]});
    }

    sort(v.begin(),v.end());
    vector<pair<ll,ll> > vv;
    fr(i,0,n)
    {
        vv.pb({-v[i].F,v[i].S});
        //vv[i].F=-v[i].F;
        //vv[i].S=v[i].S;
    }
    sort(vv.begin(),vv.end());
  //  cout<<"po";
    ll lo=0,hi=n-1;
    ll pref[n+3];
    pref[0]=0;
    fr(i,1,n)
    {
        pref[i]=pref[i-1]+v[i].F-v[i-1].F;;
    }
    ll sum[n+3];
    sum[0]=v[0].S;
    fr(i,1,n)
    {
        sum[i]=sum[i-1]+v[i].S;
    }
    ll suf[n+3];
    suf[n-1]=0;
    bk(i,n-2,0)
    {
        suf[i]=suf[i+1]+v[i+1].F-v[i].F;
    }
    ll cnt=0;
    fr(i,0,n)
    {
        if(i)
            arr[i]+=arr[i-1];
        v[i].S-=arr[i]*a;
        ll c1=0;
        if(v[i].S>0)
        {c1=v[i].S/a;
        if(v[i].S%a)
            c1++;
            cnt+=c1;}
        ll s=upper_bound(pref,pref+n,pref[i]+2*d)-pref;
        s--;

        arr[i]+=c1;
        arr[s+1]-=c1;



    }
   // cout<<"po";
    memset(arr,0ll,sizeof arr);
    ll ans=0;
    pref[0]=0;
    fr(i,1,n)
    {
        pref[i]=pref[i-1]+vv[i].F-vv[i-1].F;;
    }
    sum[0]=vv[0].S;
    fr(i,1,n)
    {
        sum[i]=sum[i-1]+vv[i].S;
    }
    //cout<<"po";
     fr(i,0,n)
    {
        if(i)
            arr[i]+=arr[i-1];
            //vv[i].S*=-1;
        vv[i].S-=arr[i]*a;
        ll c1=0;
        if(vv[i].S>0)
        {c1=vv[i].S/a;
        if(vv[i].S%a)
            c1++;
            ans+=c1;}
        ll s=upper_bound(pref,pref+n,pref[i]+2*d)-pref;
        s--;

        arr[i]+=c1;
        arr[s+1]-=c1;



    }
    /*ll sff[n];
    fr(i,0,n)
    {
        sff[i]=suf[i];
    }
    reverse(sff,sff+n);*/
   // ll ans=0;
    /*bk(i,n-1,0)
    {
        arr[i]+=arr[i+1];
        v[i].S-=arr[i]*a;
        ll c1=v[i].S/a;
        if(v[i].S%a)
            c1++;
            ans+=c1;
        ll s=upper_bound(sff,sff+n,sff[n-1-i]-2*d)-sff;
        //s--;



       // cout<<i<<" "<<ans<<endl;
        arr[i]+=c1;
        if(n-1-s-1>i)
        arr[n-1-s-1]-=c1;
        else if(i)
            arr[i-1]-=c1;

    }*/
   // cout<<ans;

 //  cout<<cnt;
 //cout<<ans;
    cout<<min(ans,cnt);
    /*while(hi>=lo)
    {
        ll cnt1=v[lo].S/a;
        if(v[lo].S%a)
            cnt1++;
        ll cnt2=v[hi].S/a;
        if(v[hi].S%a)
            cnt2++;
        ll s=upper_bound(pref,pref+n,pref[lo]+2*d)-pref;
        //if(s==pref[lo])
        s--;
        ll s1;
        if(lo)
        s1=sum[s]-sum[lo];
        else
            s1=sum[s];
        ll s2=lower_bound(pref,pref+n,pref[hi]-2*d)-pref;
        ll s3;
        s3=sum[]


    }*/








    return 0;
}


Measured memory_bytes: 17900