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


    #define mp make_pair
    #define ll  long long int
    #define f(i,n) for(ll i=0;i<n;i++)
    #define ff(i,n) for(ll i=1;i<=n;i++)
    #define  pb push_back
    //#define a(s) a.size();
    #define v() vector<ll>v
    #define PI 3.14159265
    //#define st string
    #define ss(a) sort(a.begin(),a.end())
    #define p 908197
    #define mod 1000000007
    ll mx(ll a[],ll n)
    {
        return *(max_element(a,a+n));
    }
    ll mi(ll a[],ll n)
    {
        return *(min_element(a,a+n));
    }
    ll power(ll x, ll y)
    {
        ll res = 1;	 // Initialize result
        x=x%mod;
        while (y > 0)
        {
            // If y is odd, multiply x with result
            if (y & 1)
                res = (res*x)%mod;

            // n must be even now
            y = y>>1; // y = y/2
            x = (x*x)%mod; // Change x to x^2
        }
        return res%mod;
    }

    void yes()
    {
        cout<<"YES\n";
    }
    void no()
    {
        cout<<"NO\n";
    }

    ll upperIndex(ll arr[], ll n, ll y)
    {
        ll l = 0, h = n;
        while (l <= h) {
            ll mid = (l + h) / 2;
            if (arr[mid] < y)
                l = mid + 1;
            else
                h = mid - 1;
        }
        return h;
    }
    void pa(ll a[],ll n)
    {
        f(i,n)
            cout<<a[i]<<" ";
        cout<<"\n";
    }
    void ga(ll a[],ll n) {
        f(i, n)
            cin>>a[i];
    }


    //long long int sum(ll i,ll j,ll l)
    //{

    //  return a[i][j]+a[i-l][j-l]-a[i][j-l]-a[i-l][j];
    //}
    //ll n,k,a,b;


    //ll pre[1000000];ll suff[1000000];
   /* vector<vector<ll>>a(300000);ll vis[300000];ll dist[300000];
    vector<ll>li;ll co=0;ll mxnod=-1;ll mxx=0;
    void dfs(ll st)
    {
         //cout<<st<<" ";
        //li.pb(st);
        f(i,a[st].size())
        {
            if(vis[a[st][i]]==0)
            {
                vis[a[st][i]]=1;co++;
              //  cout<<st<<" ";
                    dist[a[st][i]]=dist[st]+1;
                            if(dist[a[st][i]]>mxx)
                            {
                                mxx=dist[a[st][i]];
                                mxnod=a[st][i];
                            }
                    dfs(a[st][i]);

            }

        }


    }
    void dfs1(ll st)
    {
        //cout<<st<<" ";
        li.pb(st);
        f(i,a[st].size())
        {
            ll ch=a[st][i];

            if(dist[ch]==dist[st]-1)
            {
                //vis[a[st][i]]=1;
                //dist[a[st][i]]=dist[st]+1;
                dfs1(a[st][i]);

            }

        }


    }
    */
   //ll dp[][w]={0};
    ll sa[2000001]={0};ll lazy[2000001]={0};ll a[1000000];
    void build(ll s,ll e,ll i)
    {
        if(s==e)
        {
            sa[i]=a[s];
            return;
        }
        ll m=(s+e)/2;
        build(s,m,2*i+1);
        build(m+1,e,2*i+2);
        sa[i]=sa[2*i+1]+sa[2*i+2];

    }
    void update(ll s,ll e,ll l,ll r,ll i,ll v)
    {
        if(lazy[i]!=0)
        {
            sa[i]-=lazy[i];
            if(s!=e)
            { lazy[2*i+1]+=lazy[i];lazy[2*i+2]+=lazy[i];}
            lazy[i]=0;
        }


        if(e<l || r<s || s>e)
            return;

        if(s>=l && e<=r)
        {

            sa[i]-=v;
            if(s!=e)
            { lazy[2*i+1]+=v;lazy[2*i+2]+=v;}
            return;
        }
        // if(s==e)
        //{
        //  a[s]+=v;
        //sa[i]+=v;
        //return;
        // }
        ll m=(s+e)/2;

        update(s,m,l,r,2*i+1,v);

        update(m+1,e,l,r,2*i+2,v);

        //  cout<<"yes"<<" "<<s<<" "<<e;

        sa[i]=max(sa[2*i+1],sa[2*i+2]);
    }
    ll query(ll s,ll e,ll l,ll r,ll i)
    {
        if(lazy[i]!=0)
        {
            sa[i]-=lazy[i];
            if(s!=e)
            { lazy[2*i+1]+=lazy[i];lazy[2*i+2]+=lazy[i];}
            lazy[i]=0;
        }
        if(e<l || r<s || s>e)
            return 0;


        if(s>=l && e<=r)
        {
            return sa[i];
        }


        ll m=(s+e)/2;
        ll ls=query(s,m,l,r,2*i+1);
        ll rs=query(m+1,e,l,r,2*i+2);
        return max(ls,rs);

    }

    int main() {
        ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
        //   ll n,t,k;cin>>n>>t>>k;

    /*    ll t;cin>>t;
        while(t--)
        {




        }
        */



ll n,d,a1;cin>>n>>d>>a1;


vector<ll>x,h;
//h[n]=0;
vector<pair<ll,ll>>v;
f(i,n) {
    //cin >> x[i] >> h[i];
    ll xx,hh;cin>>xx>>hh;
v.push_back(mp(xx,hh));

}
sort(v.begin(),v.end());
f(i,n)
{
    x.emplace_back(v[i].first);
    ll val;
    if(v[i].second%a1==0)
    {
        val=v[i].second/a1;
    } else
        val=(v[i].second/a1)+1;
    h.emplace_back(val);
    a[i]=val;
//cout<<x[i]<<" "<<h[i]<<"\n";
}
build(0,n-1,0);
ll pre[300000]={0};ll su=0;ll ans=0;
f(i,n)
{
    ll g=x[i]+2*d;
   ll xx=query(0,n-1,i,i,0);
a[i]=xx;
    if(a[i]>0) {
        //  cout<<h[i]<<"\n";
        ll ind = (upper_bound(x.begin(), x.end(), g) - x.begin()) - 1;
        update(0,n-1,i,ind,0,a[i]);
    ans+=a[i];
    }

}
cout<<ans;
    /*f(j,20)
    {
        cout<<sa1[j]<<" ";
    }
    cout<<"\n";
    */

      /*  ll n;cin>>n;
        ll a[n];
        f(i,n)
        {
            cin>>a[i];
        }

        */

    }

Measured memory_bytes: 23148