#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>   
using namespace std;
using namespace __gnu_pbds;
#define int long long
#define ll long long
#define endl "\n"
#define lu unsigned long long
#define mod 1000000007
#define ld long double
#define f(i, n) for(ll i = 0; i < n; i++)
#define ff(i,n) for(int i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define v vector<ll>
#define vv vector<vector<ll> >
#define vs vector<string>
#define vpr vector<pair<ll,ll>>
#define fi first
#define se second
#define all(x)  x.begin(),x.end()
#define bg(x)  x.begin()
#define sz(x)  x.size()
#define in(x,n) f(i,n) cin>>x[i]
#define out(x,n) f(i,n) cout<<x[i]<<" "
#define lcm(x, y) ((x) * (y) / __gcd(x, y))
#define mxt(a) *(max_element(a.begin(),a.end()))
#define mnt(a)  *(min_element(a.begin(),a.end()))
#define mem(x,val) memset(x,val,sizeof(x))
#define tc    ll t;cin>>t;while(t--)
#define pi pair<int,int>
#define prfloat(val,precise) cout<<fixed<<setprecision(precise)<<val<<endl;
const ld PI = 2 * acos(0.0);
void yes(){ cout<<"YES\n";}
void no(){cout<<"NO\n";}
ll m(ll a){ return (a+mod)%mod;}
ll cel(ll x1,ll y1){ ;if((x1%y1)==0)return x1/y1;return x1/y1+1;}
ll power(ll a,ll b){ if(b==0)return 1;ll d=power(a,b/2);d=m(d*d);
if(b&1)d=m(d*a);return d;}
// set_name.find_by_order(k) It returns to an iterator to the kth element (counting from zero) in the set in O(logn) time
// set_name.order_of_key(k) It returns to the number of items that are strictly smaller than our item k in O(logn) time.
/*string operations :
str.substr (x,y) : returns a substring str[x],str[x+1],...str[x+y-1]
str.substr (x) : returns a substring str[x],... end of string
str.find(qtr) : returns the first occurenece of qtr in str */
#include<bits/stdc++.h>
using namespace std;
int seg[4000005],lazy[4000005];
v x,h;
void build(int pos,int ss,int se)
{
    if(ss==se)
    {
        seg[pos]=h[ss];
        return ;

    }
    int mid=(ss+se)/2;
    build(2*pos+1,ss,mid);
    build(2*pos+2,mid+1,se);
    seg[pos]=seg[2*pos+1]+seg[2*pos+2];
}
void update(int pos,int ss,int se,int l,int f,int val)
{
    if(lazy[pos]!=0)
    {
        seg[pos]+=(se-ss+1)*lazy[pos];
        if(ss!=se){
            lazy[2*pos+1]+=lazy[pos];
            lazy[2*pos+2]+=lazy[pos];
        }
            lazy[pos]=0;
    }
    if(ss > f || se < l || l > f)
       return ;
    if(ss >=l && se <=f)
    {
        seg[pos]+=(se-ss+1)*val;
        if(ss!=se)
        {
            lazy[2*pos+1]+=val;
            lazy[2*pos+2]+=val;
        }
    return ;
    }
    int mid=(ss+se)/2;
    update(2*pos+1,ss,mid,l,f,val);
    update(2*pos+2,mid+1,se,l,f,val);
    seg[pos]=seg[2*pos+1]+seg[2*pos+2];
    return ;
}
int query(int pos,int ss,int se,int l,int f)
{
   if(lazy[pos]!=0)
    {
        seg[pos]+=(se-ss+1)*lazy[pos];
        if(ss!=se){
            lazy[2*pos+1]+=lazy[pos];
            lazy[2*pos+2]+=lazy[pos];
        }
            lazy[pos]=0;
    }
    //normal
    if(ss > f || se < l)
    return 0;
    if(ss >=l && se <=f)
     return seg[pos];
     int mid=(ss+se)/2;
     return query(2*pos+1,ss,mid,l,f)+query(2*pos+2,mid+1,se,l,f);
}
int32_t main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int n,d,a;cin>>n>>d>>a;
	vpr vec;
	x.resize(n);
	h.resize(n);
	f(i,n)
	{
		cin>>x[i]>>h[i];
		h[i]=cel(h[i],a);		
		vec.pb({x[i],h[i]});
	}
	sort(all(vec));
	for(int i=0;i<n;i++)
	{
		x[i]=vec[i].fi;
		h[i]=vec[i].se;
		// cout<<h[i]<<" ";
	}
	// cout<<endl;

	build(0,0,n-1);
	int l=2*d+1;
	 int st=0;
	 int ans=0;
	 while(st<n)
	 {

	 	int need=query(0,0,n-1,st,st);
	 	// cout<<st<<" "<<need<<endl;
	 	if(need<=0)
	 	{
	 		st++;
	 		continue;
	 	}
	 	ans+=need;
	 	auto it=upper_bound(all(x),2*d+x[st]);
	 	it--;
	 	int index=it-x.begin();
	 	update(0,0,n-1,0,index,-need);
	 	st++;
	 }
	 cout<<ans<<endl;

	return 0;
}

Measured memory_bytes: 19180