// #pragma GCC optimize("Ofast")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define FAST std::ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define DECIMAL(n)  std::cout << std::fixed;std::cout << std::setprecision(n);
#define hell 1000000007
#define narak 998244353
#define PI 3.14159265358979323844
#define mp make_pair
#define eb emplace_back
#define pb push_back
#define fi first 
#define se second
#define ALL(v) v.begin(), v.end()
#define SORT(v) sort(ALL(v))
#define REVERSE(v) reverse(ALL(v))
#define endl "\n"
#define sqr(a) (a)*(a)
#define LCM(m,n) m*(n/__gcd(m,n))
#define inputarr(a,n) for(int xxx=0;xxx<n;++xxx) cin>>(a)[xxx]
#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
#define sz(a) (int)a.size()
#define sl(a) (int)a.length()
#define display(x) trav(a,x) cout<<a<<" ";cout<<endl
#define debug cerr<<"bhau"<<endl
#define between(n,a,b) (a<=n&&n<=b)
#define elasped_time 1.0 * clock() / CLOCKS_PER_SEC 

#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');std::cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}


template<typename T, typename U> static inline void amin(T &x, U y) { 
    if (y < x) 
        x = y; 
}

template<typename T, typename U> static inline void amax(T &x, U y) { 
    if (x < y) 
        x = y; 
}

template<typename T,typename U> std::ostream& operator<<(std::ostream& out, std::pair<T,U> a) {
    out<<a.fi<<" "<<a.se;
    return out;
}

template<typename T,typename U> std::istream& operator>>(std::istream& in, std::pair<T,U> &a) {
    in>>a.fi>>a.se;
    return in;
}

inline long long toint(const std::string &s) {std::stringstream ss; ss << s; long long x; ss >> x; return x;}
inline std::string tostring(long long number) {std::stringstream ss; ss << number; return ss.str();}
inline std::string tobin(long long x) {return std::bitset<63>(x).to_string();}

std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count());

#define ll long long
#define pii std::pair<int, int> 
#define pll std::pair<ll, ll>  
#define vi vector<int>  
#define vvi vector<vi > 
#define vii vector<pii >
#define point complex<ll>
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 

/*----------------------Graph Moves----------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*------------------------------------------------*/

//primes for hashing 937,991,1013,1409,1741

using namespace std;
using namespace __gnu_pbds;
const int maxn=2*100005;
struct node{
    ll v,lazy;
    void assign(ll val)
    {
        v=val;
    }
    void merge(node &l,node &r)
    {

    }
};
class segtree{
    node t[4*maxn];
public:
    //if a node has lazy tag then its info is correct but its children's info
    //is old, so pushdown() before going into children
    void pushdown(int v,int tl,int tr)
    {
        int ln=v*2;
        int rn=v*2+1;
        int tm=(tl+tr)/2;
        if(t[v].lazy){
            apply(ln,tl,tm,t[v].lazy);
            apply(rn,tm+1,tr,t[v].lazy);
            t[v].lazy=0;
        }
    }
    //apply() is an auxillary function to apply range update and set lazy tag
    void apply(int v,int tl,int tr,int val)
    {
        t[v].v+=val;
        t[v].lazy+=val;
    }
    void build(ll a[], int v, int tl, int tr) {
        if (tl == tr) {
            t[v].assign(a[tl]);
            return;
        } else {
            int tm = (tl + tr) / 2;
            build(a, v*2, tl, tm);
            build(a, v*2+1, tm+1, tr);
            t[v].merge(t[v*2],t[v*2+1]);
        }
    }
    void build(ll a[]){
        build(a,1,0,maxn-1);
    }
    ll query(int v, int tl, int tr, int l, int r) {
        if (l > tr || r < tl)
            return 0;
        if (l <= tl && tr <= r) {
            return t[v].v;
        }
        pushdown(v,tl,tr);
        int tm = (tl + tr) / 2;
        return query(v*2, tl, tm, l, r)+query(v*2+1, tm+1, tr, l, r);
    }
    ll query(int l,int r){
        return query(1,0,maxn-1,l,r);
    }
    void rupd(int v, int tl, int tr, int l, int r, ll val)
    {
        if(l > tr || r < tl)
            return;
        if(l <= tl && tr <= r)
        {
            apply(v,tl,tr,val);
            return;
        }
        pushdown(v,tl,tr);
        int tm = (tl + tr)/2;
        rupd(v*2,tl,tm,l,r,val);
        rupd(v*2+1,tm+1,tr,l,r,val);
        t[v].merge(t[v*2],t[v*2+1]);
    }
    void rupd(int l,int r,ll val){
        rupd(1,0,maxn-1,l,r,val);
    }
};

void meowmeow321()
{
    ll n,d,a;
    cin>>n>>d>>a;
    ll ans=0;
    pll xh[n];
    inputarr(xh,n);
    sort(xh,xh+n);
    segtree st;
    ll bb[maxn]={};
    for (int i = 0; i < n; ++i) {
        bb[i]=xh[i].se;
    }
    st.build(bb);
    for (int i = 0; i < n; ++i) {
        int x=xh[i].fi;
        int h=st.query(i,i);
        if(h<=0)continue;
        else{
            ans+=(h+a-1)/a;
            int dec=(h+a-1)/a*a;
            auto id=lower_bound(xh,xh+n,mp(x+2*d+1ll,0ll))-xh-1;
            st.rupd(i,id,-dec);
        }
    }
    cout<<ans;
}
signed main()
{
    FAST;
    int testcases=1;
    //cin>>testcases;
    for(int i=0;i<testcases;++i)
    {
        meowmeow321();
    }
    cerr<<endl<<"Time Elasped : "<<elasped_time<<endl;
    return 0;
}

Measured memory_bytes: 15104