////*24-AUG-19*///
//Why do we fall?//
// So we can learn to pick ourself up!//
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define int long long
#define endl "\n"
#define fi first
#define se second
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define fr(a,b,c) for(int a=b; a<c; a++)
#define frr(a,b,c) for(int a=b;a>=c;a--)
#define pb push_back
#define pii pair<int,int>
#define R(a) ll a; cin >> a;

typedef tree<long long,null_type,greater<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
typedef tree<long long,null_type,less<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set1;

#define RA(a, n) ll a[(n) + 1] = {}; fr(i, 1, (n)+1) {cin >> a[i];}
#define RM(a, n, m) int a[n + 1][m + 1] = {}; fr(i, 1, n+1) {fr(j, 1, m+1) cin >> a[i][j];}
#define reset(X) memset(X, 0, sizeof(X))
using vi=vector<int>;
const int inf = 1e18;
const int mod=1e9+7;
unsigned int power(int x, unsigned int y, int p)
{
    int res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isPrime(int n)
{   if (n <= 1)  return false;
    if (n <= 3)  return true;
    if (n%2 == 0 || n%3 == 0) return false;
    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;
    return true;
}
int modInverse(int n, int p)
{
    return power(n, p-2, p);
}
bool sortbysec(const pair<int,int> &a,
              const pair<int,int> &b)
{
    if(b.fi==a.fi)return (a.se>b.se);
    return (b.fi>a.fi);
}
const int maxn=2e5+5;
int t[maxn*4],lazy[maxn*4];
 vector<pair<int,int>>ad;
 vector<int>bounds;
void build(int tl,int tr,int v)
{

}
void push(int v) {
    t[v*2] += lazy[v];
    lazy[v*2] += lazy[v];
    t[v*2+1] += lazy[v];
    lazy[v*2+1] += lazy[v];
    lazy[v] = 0;
}
void update(int v, int tl, int tr, int l, int r, int addend) {
    if (l > r)
        return;
    if (l == tl && tr == r) {
        t[v] += addend;
        lazy[v] += addend;
    } else {
        push(v);
        int tm = (tl + tr) / 2;
        update(v*2, tl, tm, l, min(r, tm), addend);
        update(v*2+1, tm+1, tr, max(l, tm+1), r, addend);
        t[v] = max(t[v*2], t[v*2+1]);
    }
}

int query(int v, int tl, int tr, int l, int r) {
    if (l > r)
        return -inf;
    if (l <= tl && tr <= r)
        return t[v];
    push(v);
    int tm = (tl + tr) / 2;
    return max(query(v*2, tl, tm, l, min(r, tm)),
               query(v*2+1, tm+1, tr, max(l, tm+1), r));
}
signed main()
{
    fastio;
    R(n);
    R(d);R(a);

    fr(i,0,n)
    {
        R(x);R(h);
        ad.pb({x,h});
    }
    sort(ad.begin(),ad.end());
   // reverse(ad.begin(),ad.end());
    vector<int>xs;
    fr(i,0,ad.size())
    {
        xs.pb(ad[i].fi);
    }
    fr(i,0,xs.size())
    {
        //cout<<xs[i]<<endl;
        auto it=upper_bound(xs.begin(),xs.end(),xs[i]+2*d)-xs.begin();
        if(it==0)
        {
            bounds.pb(i);
        }
        else
        {
            it-=1;
            bounds.pb(it);
        }
    }
    int dmg[n+2];
    reset(dmg);
    int cur=0;
    int cnt=0;
    fr(i,0,ad.size())
    {
        if(i==0)
        {
            cur+=(ad[i].se/a+(ad[i].se%a?1:0))*a;
            //cout<<bounds[i]<<endl;
            dmg[bounds[i]+1]-=(ad[i].se/a+(ad[i].se%a?1:0))*a;
            cnt+=ad[i].se/a+(ad[i].se%a?1:0);
        }
        else
        {
            //cout<<dmg[i]<<endl;
            cur+=dmg[i];
            if(cur>=ad[i].se)
            {
                continue;
            }
            else
            {
                ad[i].se-=cur;
                cur+=(ad[i].se/a+(ad[i].se%a?1:0))*a;
                dmg[bounds[i]+1]-=(ad[i].se/a+(ad[i].se%a?1:0))*a;
                cnt+=ad[i].se/a+(ad[i].se%a?1:0);
            }
        }
    }
    cout<<cnt<<endl;


}


Measured memory_bytes: 10988