/*
  "Piece of shit. Stupid piece of shit. I'm a real stupid piece
   of shit. But I know I'm a piece of shit. That at least makes
   me better than all the pieces of shit that don't know they're
   pieces of shit. Or is it worse?"
     - BoJack F. Horseman
*/
#include<iostream>
#include<algorithm>
#include<bitset>
#include<cmath>
#include<cstring>
#include<climits>
#include<numeric>
#include<random>
#include<fstream>
#include<chrono>

#include<deque>
#include<queue>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<unordered_map>
// #include<ext/pb_ds/assoc_container.hpp>
// #include<ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;

#define int          long long
#define ld           long double
#define pii          pair<int,int>
#define vi           vector<int>
#define maxpq        priority_queue<int>
#define minpq        priority_queue<int,vi,greater<int>>
#define pb           push_back
#define mp           make_pair
#define ff           first
#define ss           second
#define endl         '\n'
#define rep(i,s,e)   for(int i=s;i<=e;i++)
#define brep(i,s,e)  for(int i=s;i>=e;i--)
#define all(x)       (x).begin(),(x).end()
#define ball(x)      (x).rbegin(),(x).rend()
#define sz(x)        (int)x.size()
#define mem(x,y)     memset(x,y,sizeof(x))
#define milf(x)      x.reserve(1LL<<14LL); x.max_load_factor(0.25);
#define pbds         tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
#define VR46         ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
mt19937              rng(chrono::steady_clock::now().time_since_epoch().count());

const int MOD = 1e9+7;
ld EPS = 1e-12;
const int INF32 = 0x3F3F3F3F;
const int INF = 0x3F3F3F3F3F3F3F3F;
const int crng = rng();

const int N = 8e5 + 5;
int st[N];
int lazy[N];

void PUSH(int v)
{
    lazy[2*v] += lazy[v];
    lazy[2*v+1] += lazy[v];
    lazy[v] = 0;
}

void BUILD(int v, int l, int r, vector<pii> &c)
{
    if( l==r )
    {
        st[v] = c[l].ss;
        return;
    }
    int m = l+r >> 1LL;
    BUILD( 2*v, l, m, c ), BUILD( 2*v+1,m+1,r,c );
}

void DEC(int v, int l, int r, int ql, int qr, int x)
{
    if( ql>qr ) return;
    if( l==ql && r==qr )
    {
        lazy[v] += x;
        return;
    }

    PUSH( v );

    int m = l+r >> 1LL;
    DEC( 2*v,l,m,ql,min(m,qr),x ), DEC( 2*v+1,m+1,r,max(m+1,ql),qr,x );

    // lazy[v] = lazy[2*v] + lazy[2*v+1];
}

int GETV(int v, int l, int r, int idx)
{
    if( l==r ) return st[v] - lazy[v];

    PUSH(v);
    int m = l+r >> 1LL;
    if( idx<=m ) return GETV( 2*v,l,m,idx ) + lazy[v];
    else return GETV( 2*v+1,m+1,r,idx ) + lazy[v];
}

signed main()
{
    // VR46 ifstream fin("input.txt"); ofstream fout("output.txt");
    // auto start = chrono::high_resolution_clock::now();

    // GANDU TEST CASE BNAKE TEST KRLE; CHECK BOUNDS;
    // int t; cin>>t; rep(test,1,t)
    {
        mem( lazy,0 );
        int n, d, A;
        cin>>n>>d>>A;
        vector<pii> c(n);
        // ff -> coordinate, ss -> health
        vi x(n);
        rep(i,0,n-1) cin>>c[i].ff>>c[i].ss, x[i] = c[i].ff;
        sort( all(c) );
        sort( all(x) );

        BUILD( 1,0,n-1,c );
        int ans = 0;
        rep(i,0,n-1)
        {
            // Get the point values on idx i
            int left = GETV( 1,0,n-1,i );
            // cout<<left<<endl;
            if( left<=0 ) continue;
            int times = left/A + ( left%A !=0 );
            ans += times;

            int LO = 0, HI = n-1, L = i, R = i;
            while( LO<=HI )
            {
                int M = LO+HI >> 1LL;
                if( x[M]> x[i]+2*d ) HI = M-1;
                else R = max( R,M ), LO = M+1;
            }
            // cout<<L<<" "<<R<<endl;
            // UPDATE from L to R, ie reduce range by A*times
            DEC( 1,0,n-1,L,R,A*times );
        }
        cout<<ans<<endl;
    }

    // auto stop = chrono::high_resolution_clock::now();
    // auto duration = chrono::duration_cast<chrono::milliseconds>(stop - start); 
    // cout<<"Time taken by function: "<<duration.count()<<" milliseconds"<<endl;

    // *( hsh.find_by_order(k) ) kth smallest, from 0
    // hsh.order_of_key(k) num of ele str less than k
    // change less to less_equal for multiset pbds
    // Create struct HASH; Use milf(x) for every hashmap; Use CRNG xor;
}

Measured memory_bytes: 17152