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

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define REP(i, n) for(int i = 0; i < (n); ++i)
#define REPr(i, n) for(int i = (n)-1; i >= 0; --i)
#define FORq(i, m, n) for(int i = (m); i <= (n); ++i)
#define FORqr(i, m, n) for(int i = (n); i >= (m); --i)
#define PB push_back
#define MP make_pair
#define fst first
#define snd second
#define SIN(x, S) (S.count(x) != 0)
#define M0(x) memset(x, 0, sizeof(x))
#define FILL(x, y) memset(x, y, sizeof(x))
#define MM(x) memset(x, -1, sizeof(x))
#define ALL(x) (x).begin(), (x).end()
#define DB(x) cerr << #x << " = " << x << endl
#define DB2(x, y)                                                              \
    cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n";
#define DEBUG                                                                  \
    int x12345;                                                                \
    cin >> x12345;
typedef pair<int, int> PII;
typedef pair<long long, long long> PLL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef long long ll;
typedef long long integer;
///////////////////////////////////////////////
const ll MOD = 1e9 + 7;
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }

template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}

template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

template <int MOD> struct Fp {
    long long val;

    constexpr Fp(long long v = 0) noexcept : val(v % MOD) {
        if(val < 0)
            v += MOD;
    }

    constexpr int getmod() { return MOD; }

    constexpr Fp operator-() const noexcept { return val ? MOD - val : 0; }

    constexpr Fp operator+(const Fp &r) const noexcept {
        return Fp(*this) += r;
    }

    constexpr Fp operator-(const Fp &r) const noexcept {
        return Fp(*this) -= r;
    }

    constexpr Fp operator*(const Fp &r) const noexcept {
        return Fp(*this) *= r;
    }

    constexpr Fp operator/(const Fp &r) const noexcept {
        return Fp(*this) /= r;
    }

    constexpr Fp &operator+=(const Fp &r) noexcept {
        val += r.val;
        if(val >= MOD)
            val = val % MOD;
        return *this;
    }

    constexpr Fp &operator-=(const Fp &r) noexcept {
        val -= r.val;
        if(val < 0)
            val += MOD * ((-val + MOD - 1) / MOD);
        val = val % MOD;
        return *this;
    }

    constexpr Fp &operator*=(const Fp &r) noexcept {
        val = val * r.val % MOD;
        return *this;
    }

    constexpr Fp &operator/=(const Fp &r) noexcept {
        long long a = r.val, b = MOD, u = 1, v = 0;
        while(b) {
            long long t = a / b;
            a -= t * b;
            swap(a, b);
            u -= t * v;
            swap(u, v);
        }
        val = val * u % MOD;
        if(val < 0)
            val += MOD;
        return *this;
    }

    constexpr bool operator==(const Fp &r) const noexcept {
        return this->val == r.val;
    }

    constexpr bool operator!=(const Fp &r) const noexcept {
        return this->val != r.val;
    }

    friend constexpr ostream &operator<<(ostream &os,
                                         const Fp<MOD> &x) noexcept {
        return os << x.val;
    }

    friend constexpr istream &operator>>(istream &is, Fp<MOD> &x) noexcept {
        return is >> x.val;
    }

    friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, long long n) noexcept {
        if(n == 0)
            return 1;
        auto t = modpow(a, n / 2);
        t = t * t;
        if(n & 1)
            t = t * a;
        return t;
    }
};

using mint = Fp<MOD>;

///////////////////////////////////////////////
/// 🍈( '-' 🍈 |AC|

struct LazySegmentTree{
    // for vertex n
    // par (n-1)/2
    // chi 2n+1,2n+2

    // index i
    // bottom vertex n+i-1

    int segn2; // imply actually vertex number
    vector<ll> data,lazy; 
     
    LazySegmentTree(int n){
        segn2=1;
        while(segn2<n) segn2*=2; //必要分2^Mを取る
         
        data.resize(segn2*2,0);
        lazy.resize(segn2*2,0);
    }
    
    inline void eval(int k,int l,int r){
        if (lazy[k] != 0){ // lazy nonzero
            data[k] += lazy[k]; // itself
            
            if (r-l > 1){
                lazy[2*k+1] += lazy[k] / 2;
                lazy[2*k+2] += lazy[k] / 2;
            }

            lazy[k] = 0;
        }
    }

    ll query(int a,int b,int l=0,int r=-1,int k=0){
        if(r<0) r=segn2; // when calling function at first
        eval(k,l,r);

        if (r <= a || b <= l) return 0; //disjoint
        if (a <= l && r <= b) return data[k]; //include
        
        ll vl = query(a,b,l,(l+r)/2,k*2+1);
        ll vr = query(a,b,(l+r)/2,r,k*2+2);
        return vl+vr;
    }
     
    
    void update(int a,int b ,ll x, int l = 0, int r=-1,int k = 0){
        if(r==-1) r=segn2;

        eval(k,l,r);
        
        if (b <= l || r <= a) return;

        if (a <= l && r <= b){
            lazy[k] += (r-l) * x;
            eval(k,l,r);
        }else{
            //一部のみ含むとき，子ノードを計算してその結果をもらう
            update(a,b,x,l,(l+r)/2,2*k+1);
            update(a,b,x,(l+r)/2,r,2*k+2);
            data[k] = data[2*k+1] + data[2*k+2];
        }
        
    }
};

int main() {
    ll N,D,A; cin >> N >> D >> A;
    vector<ll> X,H;
    ll ans = 0;
    vector<PLL> XH;
    REP(i,N){
        ll x,h; cin >> x >> h;
        XH.PB(MP(x,(h+A-1)/A));
    }
    sort(ALL(XH));

    REP(i,N){
        X.push_back(XH[i].fst);
        H.push_back(XH[i].snd);    
    }

    X.PB(1e9);
    H.PB(1e9);

    LazySegmentTree seg(N);
    REP(i,N){
        seg.update(i,i+1,H[i]);
    }

    REP(i,N){
        //DB2(i,H[i]);
    }
    REP(i,N){
        ll now = seg.query(i,i+1);
        //DB2(i,now);
        if (now <= 0) continue;
        ans += now;
        auto it = upper_bound(ALL(X), X[i] + 2 * D);
        int upind = it - X.begin();
        //DB2(i,upind);
        seg.update(i,upind,-now);
    }

    cout << ans << endl;
}

Measured memory_bytes: 17004