#include <bits/stdc++.h>
#define ff first
#define ss second
#define ll long long
#define ld long double
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define pii pair<int, int>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define sws ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl '\n'
#define teto(a, b) ((a+b-1LL)/(b))
using namespace std;

const int MAX = 200010;
const int MOD = 1000000007;
const int INF = 1e8;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
const ld EPS = 1e-7;

// Extra
#define forn(i, n) for(int i = 0; i < (int)n; i++)
#define forne(i, a, b) for(int i = a; i <= b; i++)
#define all(x) x.begin(), x.end()
#define dbg(msg, var) cout << msg << " " << var << endl;
//
#define pll pair<ll,ll>

struct ST {
    ll id = 0;

    int size;
    vl operations;
    vector<pll> mins;

    pll wtf(pll a, pll b) {
        if(a.ff <= b.ff) {
            return a;
        }
        return b;
    }

    void init(ll n) {
        size = 1;
        while(size < n) size *= 2;
        mins.assign(2*size, pair<ll,ll>(0, 0));
        operations.assign(2*size, 0);
    }

    void add(ll l, ll r, ll v, ll x, ll lx, ll rx) {
        if(r <= lx or l >= rx) return;
        if(l <= lx && rx <= r) {
            if(rx-lx == 1)
                mins[x].ss = lx;

            operations[x] += v;
            mins[x].ff += v;
            return;
        }

        int m = (rx + lx)/2;
        add(l, r, v, 2*x +1 , lx, m);
        add(l, r, v, 2*x +2 , m, rx);

        mins[x] = wtf(mins[2*x +1], mins[2*x +2]);
        mins[x].ff += operations[x];
    }

    void add(ll l, ll r, ll v) {
        add(l, r, v, 0, 0, size);
    }

    pll min(ll l, ll r, ll x, ll lx, ll rx) {
        if(r <= lx or l >= rx) return mp(LLINF, -1);
        if(l <= lx && rx <= r) {
            return mins[x];
        }

        int m = (lx + rx)/2;

        pll s1 = min(l, r, 2*x +1, lx, m);
        pll s2 = min(l, r, 2*x +2, m, rx);
        pll res = wtf(s1, s2);
        res.ff += operations[x];

        return res;
    }

    pair<ll,ll> min(ll l, ll r) {
        return min(l, r, 0, 0, size);
    }
};



int main() {
    sws;
    ll n, d, a;
    cin >> n >> d >> a;

    vector<pll> v;
    forn(i, n) {
        int x, h;
        cin >> x >> h;

        v.pb(mp(x, h));
    }

    sort(all(v));

    ST st = ST();
    st.init(n+2);
    for(int i = 0; i < n; i++) {
        st.add(i, i+1, v[i].ss);
    }

    // for(int i = 0; i < n; i++) {
    //     auto p = st.min(i, i+1);
    //     cout << p.ff << " ";
    // }
    // cout << endl;

    ll idx = 0, res = 0;
    while(idx < n) {
        ll vida = max(0LL, (ll)st.min(idx, idx+1).ff);
        if(vida <= 0) {
            idx++;
            continue;
        }

        ll l = v[idx].ff;
        ll r = l + 2*d;
        ll prox = lower_bound(all(v), mp(r+1, (ll)-LLINF))-v.begin()-1;

        ll delta = teto(1LL*vida, a)*a;
        st.add(idx, prox+1, -delta);

        res += 1LL*teto(vida, a);
        // cout << "tirando " << vida << endl;

        // cout << "l = " << l << " r = " << r << endl;
        // cout << "idx = " << idx << " prox = " << prox << endl;

        idx++;
    }

    cout << res << endl;

    return 0;
}


Measured memory_bytes: 18724