/**
 * Libraries
 */
#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <iomanip>
#include <set>
#include <unordered_map>

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

using namespace std;

/**
 * macros
 */
#define rep(i,n) for(int i=0,i##_len=(n);i<i##_len;++i)
#define repx(i,s,e,d) for(int i=s,i##_end=(e);i<i##_end;i+=d)
#define repxr(i,s,e,d) for(int i=s,i##_end=(e);i>i##_end;i+=d)
#define rept(n) for(int ___i___=0,i##_len=(n);___i___<i##_len;++___i___)
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
#define ALL(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define BIT(n) (1LL<<(n))
#define UNIQUE(v) v.erase(unique(v.begin(),v.end()),v.end());
#define CEIL(x, y) (((x) + (y) - 1) / (y))

/**
 * standard input helpers
 */
// vector
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
    for (T &x : vec) is >> x;
    return is;
}
// pair
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &pair_var) {
    os << "(" << pair_var.first << ", " << pair_var.second << ")";
    return os;
}
// vector
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
    os << "{";
    for (int i = 0; i < vec.size(); i++) {
        os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
    }
    os << "}";
    return os;
}
// map
template <typename T, typename U>
ostream &operator<<(ostream &os, map<T, U> &map_var) {
    os << "{";
    repi(itr, map_var) {
        os << *itr;
        itr++;
        if (itr != map_var.end()) os << ", ";
        itr--;
    }
    os << "}";
    return os;
}
// set
template <typename T>
ostream &operator<<(ostream &os, set<T> &set_var) {
    os << "{";
    repi(itr, set_var) {
        os << *itr;
        itr++;
        if (itr != set_var.end()) os << ", ";
        itr--;
    }
    os << "}";
    return os;
}
/**
 * debug tools
 */
#define DUMPOUT cout
void dump_func() {
    DUMPOUT << endl;
}
template <class Head, class... Tail>
void dump_func(Head &&head, Tail &&... tail) {
    DUMPOUT << head;
    if (sizeof...(Tail) > 0) {
        DUMPOUT << ", ";
    }
    dump_func(std::move(tail)...);
}
#ifdef LOCAL_
#define dump(...)                                                              \
    DUMPOUT << "  " << string(#__VA_ARGS__) << ": "                            \
            << "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]"        \
            << endl                                                            \
            << "    ",                                                         \
        dump_func(__VA_ARGS__)
#else
#define dump(...)
#endif

/**
 * helpers
 */
typedef long long int lli;
typedef pair<int, int> ii;
typedef priority_queue<int, vector<int>, greater<int> > heapq;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
struct aaa{
    aaa(){
        cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
    };
}aaaaaaa;
#define int long long int
struct Mons{
    int x, h;
    bool operator<(const Mons& k) const {
        return this->x < k.x;
    }
};
template<typename Monoid, typename OperatorMonoid = Monoid>
class LSegTree {
public:
    using F = function< Monoid(Monoid, Monoid) >;
    using G = function< Monoid(Monoid, OperatorMonoid) >;
    using H = function< OperatorMonoid(OperatorMonoid, OperatorMonoid) >;
    using P = function< OperatorMonoid(OperatorMonoid, int) >;

    int size;
    Monoid seg[(1 << 19) - 1]; // セグメント(要素)
    OperatorMonoid lazy[(1 << 19) - 1]; //伝播を遅延させるため滞留させておく(作用素)
    const F f; // クエリに用いる演算
    const G g; // 要素と作用素のマージの演算
    const H h; // 作用素と作用素のマージの演算
    const P p; // 作用素を伝播するときにの演算
    const Monoid M1; // 要素の型
    const OperatorMonoid OM0; // 作用素の型

    /**
    * 初期化
    * @order O(N)
    */
    LSegTree(int n, const F f, const G g, const H h, const P p,
            const Monoid &M1, const OperatorMonoid OM0)
        : f(f), g(g), h(h), p(p), M1(M1), OM0(OM0)
    {
        size = 1;
        while(size < n) size <<= 1;
        for (int i = 0; i < 2 * size - 1; i++) {
            seg[i] = M1;
            lazy[i] = OM0;
        }
    }
    /**
     * 初期化 (簡易版)
     * @order O(N)
     */
    LSegTree(int n, const F f, const G g, const H h,
            const Monoid &M1, const OperatorMonoid OM0)
        : f(f), g(g), h(h),
        p([](OperatorMonoid o, int i){ return o; }),
      M1(M1), OM0(OM0)
    {
        size = 1;
        while(size < n) size <<= 1;
        for (int i = 0; i < 2 * size - 1; i++) {
            seg[i] = M1;
            lazy[i] = OM0;
        }
    }
    /**
     * 初期化 (超簡易版)
     * @order O(N)
     */
    LSegTree(int n, const F f, const Monoid &M1, const OperatorMonoid OM0)
        : f(f),
        g([](Monoid m, OperatorMonoid o){ return m + o; }),
        h([](OperatorMonoid o1, OperatorMonoid o2){ return o1 + o2; }),
        p([](OperatorMonoid o, int i){ return o; }),
      M1(M1), OM0(OM0)
    {
        size = 1;
        while(size < n) size <<= 1;
        for (int i = 0; i < 2 * size - 1; i++) {
            seg[i] = M1;
            lazy[i] = OM0;
        }
    }
    /**
     * セグ木構築(セグメントを直接操作したとき用)
     * @order O(N)
     */
    void build()
    {
        for(int k = size - 1; k > 0; k--) {
            seg[k] = f(seg[2 * k + 0], seg[2 * k + 1]);
        }
    }
    /**
     * 1段伝播させる
     * @order O(1)
     */
    void propagate(int k, int len)
    {
        if(lazy[k] != OM0) {
            if(k < size) {
                lazy[2 * k + 0] = h(lazy[2 * k + 0], lazy[k]);
                lazy[2 * k + 1] = h(lazy[2 * k + 1], lazy[k]);
            }
        seg[k] = g(seg[k], p(lazy[k], len));
        lazy[k] = OM0;
        }
    }
    /**
     * 区間更新
     * @order O(logN)
     */
    Monoid update(int a, int b, const OperatorMonoid &x, int k, int l, int r)
    {
        propagate(k, r - l);
        if(r <= a || b <= l) { // 管理区間外への更新はしない
            return seg[k];
        } else if(a <= l && r <= b) { // 更新区間が管理区間を完全に含む
            lazy[k] = h(lazy[k], x);
            propagate(k, r - l);
            return seg[k];
        } else { // 区間が部分的に含まれるので、下に問い合わせ
            return seg[k] = f(update(a, b, x, 2 * k + 0, l, (l + r) >> 1),
                                update(a, b, x, 2 * k + 1, (l + r) >> 1, r));
        }
    }
    /**
     * 区間更新(はじめの一回)
     * @order O(logN)
     */
    Monoid update(int a, int b, const OperatorMonoid &x)
    {
        return update(a, b, x, 1, 0, size);
    }
    /**
     * 区間クエリ
     * @order O(logN)
     */
    Monoid query(int a, int b, int k, int l, int r)
    {
        propagate(k, r - l);
        if(r <= a || b <= l) {
          return M1;
        } else if(a <= l && r <= b) {
          return seg[k];
        } else {
          return f(query(a, b, 2 * k + 0, l, (l + r) >> 1),
                query(a, b, 2 * k + 1, (l + r) >> 1, r));
        }
    }
    /**
     * 区間クエリ(はじめの一回)
     * @order O(logN)
     */
    Monoid query(int a, int b)
    {
        return query(a, b, 1, 0, size);
    }
    /**
     * 要素へのランダムアクセス(初期化以外ほぼ使わないかも buildしてね)
     * @order O(1)
     */
    Monoid& operator[](const int &k)
    {
        return seg[k + size];
    }
};
signed main() {
    int N, D, A; cin >> N >> D >> A;
    vector<Mons> M(N);
    rep(i, N) {
        int x, h; cin >> x >> h;
        M[i].x = x; M[i].h = h;
    }

    sort(ALL(M));
    LSegTree<int> lst(N, [](int l, int r){ return l + r; }, 0, 0);
    vector<int> X(N);
    rep(i, N) {
        X[i] = M[i].x;
        lst[i] = M[i].h;
    }
    lst.build();

    int ans = 0;
    rep(i, N) {
        int h = lst.query(i, i + 1);
        if (h <= 0) continue;
        int l = X[i];
        int r = l + 2 * D;
        int num = CEIL(h, A);
        int dmg = num * A;
        auto eit = upper_bound(ALL(X), r);
        int ei = distance(X.begin(), eit);
        lst.update(i, ei, -dmg);

        ans += num;
    }

    cout << ans << endl;
}


Measured memory_bytes: 13184