/**
 *  “Experience is the name everyone gives to their mistakes.” – Oscar Wilde
 *
 *  author  :   prodipdatta7
 *  created :   Sunday 26-January, 2020  06:55:43 PM
**/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

// #pragma GCC optimize("Ofast")
// #pragma GCC target("avx,avx2,fma")
// #pragma GCC optimize("unroll-loops")

using namespace std ;
using namespace __gnu_pbds ;

#define     ll          long long
#define     ld          long double
#define     ull         unsigned long long
#define     pii         pair<int,int>
#define     pll         pair<ll,ll>
#define     vi          vector<int>
#define     vll         vector<ll>
#define     vvi         vector<vector<int>>
#define     debug(x)    cerr << #x << " = " << x << '\n' ;
#define     rep(i,b,e)  for(__typeof(e) i = (b) ; i != (e + 1) - 2 * ((b) > (e))  ; i += 1 - 2 * ((b) > (e)))
#define     all(x)      x.begin() , x.end()
#define     rall(x)     x.rbegin() , x.rend()
#define     sz(x)       (int)x.size()
#define     ff          first
#define     ss          second
#define     pb          push_back
#define     eb          emplace_back
#define     mem(a)      memset(a , 0 ,sizeof a)
#define     memn(a)     memset(a , -1 ,sizeof a)
#define     fread       freopen("input.txt","r",stdin)
#define     fwrite      freopen("output.txt","w",stdout)
#define     TN          typename

typedef tree <int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update > ordered_set;
typedef tree <int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update > ordered_multiset;

/* 
Note :  There is a problem with erase() function in ordered_multiset (for less_equal<int> tag). 
        lower_bound() works as upper_bound() and vice-versa. 
        Be careful to use.
        i) find_by_order(k) : kth smallest element counting from 0 .
        ii) order_of_key(k) : number of elements strictly smaller than k.
*/

/*###############-> Input Section <-###############*/

template <TN T> inline void Int(T &a) {
    bool minus = false; a = 0; char ch = getchar();
    while (true) { if (ch == '-' or (ch >= '0' && ch <= '9')) break; ch = getchar(); }
    if (ch == '-') minus = true; else a = ch - '0';
    while (true) { ch = getchar(); if (ch < '0' || ch > '9') break; a = a * 10 + (ch - '0'); }
    if (minus)a *= -1 ;
}
template < TN T, TN T1 > inline void Int(T &a, T1 &b) {Int(a), Int(b) ;}
template < TN T, TN T1, TN T2 > inline void Int(T &a, T1 &b, T2 &c) {Int(a, b), Int(c) ;}
template < TN T, TN T1, TN T2, TN T3 > inline void Int(T &a, T1 &b, T2 &c, T3 &d) {Int(a, b), Int(c, d) ;}
template < TN T, TN T1, TN T2, TN T3, TN T4> inline void Int(T &a, T1 &b, T2 &c, T3 &d, T4 &e) {Int(a, b), Int(c, d, e) ;}

/*###############-> Debugger <-###############*/

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {cout << endl ;}
template<TN T, TN... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << ' ' ;
    err(++it, args...);
}

/*###############-> Constraints <-###############*/

const int N          = (int)2e5 + 5 ;
const int maxN       = (int)1e6 + 6 ;
const ll  Mod        = (ll)1e9 + 7 ;
const int inf        = (int)2e9 ;
const ll  Inf        = (ll)1e18 ;
const int mod        = (int)1e9 + 7 ;

inline int add(int a, int b, int mod) {a += b ; return a >= mod ? a - mod : a ;}
inline int sub(int a, int b, int mod) {a -= b ; return a < 0 ? a + mod : a ;}
inline int mul(int a, int b, int mod) {return (ll)a * b % mod ;}

/*...... ! Code starts from here ! ......*/

int T[N << 2] ;
ll lazy[N << 2] ;

struct data {
    int a, b ;
    data(): a(0), b(0) {}
    data(int a, int b): a(a), b(b) {}
    bool operator<(const data& p)const {
        return (a < p.a) ;
    }
} v[N] ;


void build(int i, int b, int e){
    if(b == e){
        T[i] = v[b].b ;
        return ;
    }
    int mid = (b + e) >> 1 ;
    build(i << 1, b, mid) ;
    build(i << 1 | 1, mid + 1, e) ;
}


void propagate(int i, int b, int e){
    if(lazy[i]){
        T[i] -= lazy[i] ;
        if(b != e){
            lazy[i << 1] += lazy[i] ;
            lazy[i << 1 | 1] += lazy[i] ;
        }
        lazy[i] = 0 ;
    }
}

void update(int i, int b, int e, int l, int r, int v){
    propagate(i, b, e) ;
    if(b > r or e < l)return ;
    if(l <= b and e <= r){
        T[i] -= v ; 
        if(b != e){
            lazy[i << 1] += v ; 
            lazy[i << 1 | 1] += v ; 
        }
        return ;
    }
    int mid = (b + e) >> 1 ;
    update(i << 1, b, mid, l, r, v) ;
    update(i << 1 | 1, mid + 1, e, l, r, v) ;
}

int query(int i, int b, int e, int p){
    propagate(i, b, e) ;
    if(b == e)return T[i] ;
    int mid = (b + e) >> 1 ;
    if(p <= mid)return query(i << 1, b, mid, p) ;
    else return query(i << 1 | 1, mid + 1, e, p) ;
}

int main() {
    // ios_base::sync_with_stdio(false) ;
    // cin.tie(NULL) ; cout.tie(NULL) ;
    int test = 1 , tc = 0 ;
    //Int(test) ;
    while (test--) {
        int n, d, a ; Int(n, d, a) ;
        for(int i = 1 ; i <= n ; ++i){
            int x, y ; Int(x, y) ;
            v[i] = data(x, y) ;
        }
        sort(v + 1, v + n + 1) ;
        build(1, 1, n) ;
        d *= 2 ;
        ll res = 0 ;
        for(int i = 1 ; i <= n ; ++i){
            //error(v[i].a, v[i].b)
            int cur = query(1, 1, n, i) ;
            //error(cur, i)
            if(cur <= 0)continue ;
            //error(cur)
            int l = i, r = n, pos = i ; 
            while(l <= r){
                int mid = (l + r) >> 1 ;
                if(v[mid].a - v[i].a <= d){
                    //error(mid, d, v[mid].a, v[i].a)
                    pos = mid, l = mid + 1 ;
                }
                else r = mid - 1 ;
            }
            //error(pos)
            int need = (cur + a - 1) / a ;
            res += need ;
            //error(need, res)
            update(1, 1, n, i, pos, need * a) ;
            //error(res)
        }
        printf("%lld\n",res);
    }
    return 0 ;
}

Measured memory_bytes: 10496