#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define inf 1000000000000000000
#define ninf -1000000000
#define endl '\n' 
#define she_told_me_dont_worry ios_base::sync_with_stdio (false) ; cin.tie(0) ; cout.tie(0) ;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
// Use cout.flush() for interactive problems.
// Use this for increased stack size: g++ -o a.exe -Wl,--stack=256000000 -O2 source.cpp
inline long long  MAX2(long long  a, long long int b){return (a)>(b)?(a):(b);}
inline long long  MAX3(long long  a, long long  b,long long  c){return (a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c));}
inline long long  MIN2(long long  a, long long  b){return (a)<(b)?(a):(b);}
inline long long  MIN3(long long  a, long long b,long long c){return (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c));}
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef pair<int,int> ii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector< ii > vii;
struct node
{
    ll val, lazy;
    node *left, *right;
    node()
    {
        val = 0;
        lazy = 0;
        left = NULL;
        right = NULL;
    }
};
void update(node* p, ll l, ll r, ll i, ll j, ll val)
{
    // lazy part
    if(p->lazy != 0)
    {
        if( l != r)
        {
            if(p->left == NULL)
                p->left = new node;
            p->left->lazy += p->lazy;
            if(p->right == NULL)
                p->right = new node;
            p->right->lazy += p->lazy;
        }
        p->val += p->lazy;
        p->lazy = 0;
    }
    if(i>r|| j<l)
         return;
    if(l>=i&&r<=j)
    {
        p->lazy += val;
        return ;
    }
    ll mid= (l+r)/2;
    if(p->left == NULL)
        p->left = new node;
    update(p->left, l, mid, i, j, val);
    if(p->right == NULL)
        p->right = new node;
    update(p->right, mid+1, r, i, j, val);
    p->val = MIN2(p->left->val, p->right->val);
}
ll rq(node* p ,ll  l, ll r, ll i , ll j)
{
    // lazy part
    if(p->lazy != 0)
    {
        if( l != r)
        {
            if(p->left == NULL)
                p->left = new node;
            p->left->lazy += p->lazy;
            if(p->right == NULL)
                p->right = new node;
            p->right->lazy += p->lazy;
        }
        p->val += p->lazy;
        p->lazy = 0;
    }
    if(i>r|| j<l)
        return inf;
    if(l>=i&&r<=j)
        return p->val;
    ll mid=(l+r)/2;
    ll lval = inf, rval = inf;
    if( p->left != NULL)
        lval = rq(p->left, l, mid, i, j);
    if( p->right != NULL)
        rval = rq(p->right, mid+1, r, i, j);
    return MIN2(lval, rval);
}
node * head;
int main()
{
    she_told_me_dont_worry
    ll n, d, a;
    cin>>n>>d>>a;
    ll i;
    vector< pll > monsters;
    head = new node;
    FOR0(i, n)
    {
        pll m;
        cin>>m.ff>>m.ss;
        monsters.pb(m);
        update(head, 0, 1e9, m.ff, m.ff, m.ss);
    }
    sort(monsters.begin(), monsters.end());
    ll ans = 0;
    FOR0(i, n)
    {
        ll x = monsters[i].ff;
        ll h = rq(head, 0, 1e9, x, x);
        if( h > 0)
        {
            ll cur = h/a;
            if(h%a) cur++;
            ans += cur;
            update(head, 0, 1e9, x, x+2*d, -1*cur*a);
        }
    }
    cout<<ans<<endl;
    cerr <<endl<< "Time elapsed : " << clock() * 1000.0 / CLOCKS_PER_SEC << " ms" << '\n';
}

Measured memory_bytes: 462444