//#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const ll INF = (1 << 28);
const ll MOD = 1000000007;
const ll dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const ll Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define REP(i, n) for (ll i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define debug(v) cout<<#v<<":";for(auto x:v){cout<<x<<' ';}cout<<endl; 
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
//setprecision(15)有効数字15桁
//-std=c++14
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b){return a * b / gcd(a, b);}
ll n, d, a;
vector<p> x1;
struct LazySegmentTree {
private:
    ll n;
    vector<ll> node, lazy;

public:
    LazySegmentTree(vector<ll> v) {
        ll sz = (int)v.size();
        n = 1; while(n < sz) n *= 2;
        node.resize(2*n-1);
        lazy.resize(2*n-1, 0);

        for(ll i=0; i<sz; i++) node[i+n-1] = v[i];
        for(ll i=n-2; i>=0; i--) node[i] = node[i*2+1] + node[i*2+2];
    }

    void eval(ll k, ll l, ll r) {
        if(lazy[k] != 0) {
            node[k] += lazy[k];
            if(r - l > 1) {
                lazy[2*k+1] += lazy[k] / 2;
                lazy[2*k+2] += lazy[k] / 2;
            }
            lazy[k] = 0;
        }
    }

    void add(ll a, ll b, ll x, ll k=0, ll l=0, ll r=-1) {
        if(r < 0) r = n;
        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 {
            add(a, b, x, 2*k+1, l, (l+r)/2);
            add(a, b, x, 2*k+2, (l+r)/2, r);
            node[k] = node[2*k+1] + node[2*k+2];
        }
    }

    ll getsum(ll a, ll b, ll k=0, ll l=0, ll r=-1) {
        if(r < 0) r = n;
        eval(k, l, r);
        if(b <= l || r <= a) return 0;
        if(a <= l && r <= b) return node[k];
        ll vl = getsum(a, b, 2*k+1, l, (l+r)/2);
        ll vr = getsum(a, b, 2*k+2, (l+r)/2, r);
        return vl + vr;
    }
};
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n>>d>>a;
    ll ans = 0;
    vector<ll> x(n,0), h(n,0);
    for (ll i = 0; i < n; i++)
    {
        ll temp,temp1;
        cin >> temp>>temp1;
        x1.push_back(make_pair(temp,temp1));
    }

    sort(ALL(x1));
    LazySegmentTree seg( vector<ll>(n, 0) );
    for(ll i=0;i<n;i++){
        x[i]=x1[i].first;
        h[i]=x1[i].second;
    }
    for(ll i=0;i<n;i++){
        ll temp=(h[i]-seg.getsum(i-1,i)+a-1)/a;
        //cout<<seg.getsum(i-1,i)<<"\n";
        if(temp<0){
            temp=0;
        }
        ans+=temp;
        auto iter=upper_bound(ALL(x), x[i]+2*d);
        //auto iter1=lower_bound(ALL(h), h[i]-d);
        ll temp1=iter-x.begin();
        /*
        cout<<temp1<<"\n";
        cout<<temp<<"\n";
        */
        seg.add(i,temp1-1,a*temp);
        //cout<<"\n";
    }
    cout << ans << "\n";
}



Measured memory_bytes: 17004