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

// 区間更新・区間取得
template <typename T>
struct Segment {
    using u32 = uint_fast32_t;
    u32 n;
    vector<T> node, lazy;
    T ef, eg;               // 単位元∧初期値
    function<T(T, T)> f;    // 更新
    function<T(T, T)> g;    // 取得
    function<T(T, u32)> p;  // 更新 f(a,a, ...,a)

    void eval(u32 len, u32 k) {
        if (lazy[k] != ef) {
            if (2 * k + 1 < 2 * n - 1) {
                lazy[2 * k + 1] = f(lazy[2 * k + 1], lazy[k]);
                lazy[2 * k + 2] = f(lazy[2 * k + 2], lazy[k]);
            }
            node[k] = f(node[k], p(lazy[k], len));
            lazy[k] = ef;
        }
    }

   public:
    Segment(u32 N, T ef, T eg, function<T(T, T)> f, function<T(T, T)> g,
            function<T(T, u32)> p = [](T a, u32 b) { return a; }, vector<T> v = vector<T>())
        : ef(ef), eg(eg), f(f), p(p), g(g) {
        n = 1;
        while (n < N) n *= 2;
        node.assign(2 * n - 1, eg);
        lazy.assign(2 * n - 1, ef);
        if (N == (u32)v.size()) {
            for (int i = 0; i < N; i++) node[i + n - 1] = v[i];
            for (int i = n - 2; i >= 0; i--) {
                node[i] = g(node[2 * i + 1], node[2 * i + 2]);
            }
        }
    }

    // [a,b)をxで更新
    void update(u32 a, u32 b, T x, u32 k, u32 l, u32 r) {
        eval(r - l, k);
        if (b <= l || r <= a) return;  // 含まない
        if (a <= l && r <= b) {        // 完全に含む
            lazy[k] = f(lazy[k], x);
            eval(r - l, k);
        } else {
            update(a, b, x, 2 * k + 1, l, (l + r) / 2);
            update(a, b, x, 2 * k + 2, (l + r) / 2, r);
            node[k] = g(node[2 * k + 1], node[2 * k + 2]);
        }
    }
    void update(u32 a, u32 b, T x) { update(a, b, x, 0, 0, n); }

    // [a,b)の区間取得
    T get(u32 a, u32 b, u32 k, u32 l, u32 r) {
        eval(r - l, k);
        if (b <= l || r <= a) return eg;       // 含まない
        if (a <= l && r <= b) return node[k];  // 完全に含む
        T vl = get(a, b, 2 * k + 1, l, (l + r) / 2);
        T vr = get(a, b, 2 * k + 2, (l + r) / 2, r);
        return g(vl, vr);
    }
    T get(u32 a, u32 b) { return get(a, b, 0, 0, n); }
};

struct monster {
    ll x, h;
};

int main() {
    int n;
    ll d, a;
    cin >> n >> d >> a;
    vector<monster> p(n);
    for (int i = 0; i < n; i++) {
        cin >> p[i].x >> p[i].h;
    }
    sort(p.begin(), p.end(), [](monster m0, monster m1) { return m0.x < m1.x; });
    vector<ll> h(n), x(n);
    for (int i = 0; i < n; i++) {
        h[i] = p[i].h;
        x[i] = p[i].x;
    }

    auto f = [](ll a, ll b) { return a + b; };
    auto g = [](ll a, ll b) { return max(a, b); };
    auto pf = [](ll a, uint_fast32_t b) { return a * b; };
    Segment<ll> tree(n, 0ll, -1e18, f, g, pf, h);
    ll ans = 0;
    for (int i = 0; i < n; i++) {
        ll hp = tree.get(i, i + 1);
        if (hp > 0) {
            auto ite = upper_bound(x.begin(), x.end(), x[i] + 2 * d);
            ll k = hp / a + (hp % a != 0);
            if (i == n - 1 || *ite == x[i + 1]) {
                tree.update(i, i + 1, -k * a);
            } else {
                tree.update(i, ite - x.begin(), -k * a);
            }
            ans += k;
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 16256