#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef map <ll,ll> mm;
typedef vector <ll> mv;
typedef pair <ll,ll> mp;
typedef set <ll> ms;
typedef queue <ll> mq;
typedef deque <ll> mdq;
typedef stack <ll> mst;
typedef priority_queue <ll> mpq;
typedef priority_queue <ll, vector<ll>, greater<ll> > mmh;
typedef complex<double> cd; 
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define flush cout.flush();
#define all(v) v.begin(),v.end()
#define pb(v) push_back(v)
#define cn continue
#define forl(i,n) for(ll i=0;i<n;i++)
#define forlr(i,n) for(ll i=n-1;i>=0;i--)
#define rev(s) reverse(s.begin(),s.end())
void swap(ll &a,ll &b)
{
	ll tmp=a;
	a=b;
	b=tmp;
}
ll atoistring(string s)
{
	stringstream lol(s);
	ll x;
	lol>>x;
	return x;
}
void pv(mv v)
{
	forl(i,v.size())
	{
		cout<<v[i]<<" ";
	}
	cout<<"\n";
}
void pa(ll *v,ll size)
{
	forl(i,size)
	{
		cout<<v[i]<<" ";
	}
	cout<<"\n";
}
// ll nck(ll N,ll K,ll mod)
// {
// 	if(N<K)
// 	{
// 		return 0;
// 	}
// 	return (((facs[N]*facsinv[N-K])%mod)*facsinv[K])%mod;
// }
ll power(ll x,ll y,ll p)
{
	ll res=1;
	x=x%p;
	while(y>0)
	{
		if(y&1)
		{
			res=(res*x)%p;
		}
		y=y>>1;
		x=(x*x)%p;
	}
	return res;
}
void checkmod(ll &x,ll mod)
{
	if(x>=mod)
	{
		x%=mod;
	}
}
ll sumofgp(ll a,ll n,ll m)
{
	// n = number of terms - 1
	if(n<0)
	{
		return 0;
	}
	if(n==0)
	{
		return 1;
	}
	if(n==1)
	{
		return (1+a)%m;
	}
	ll ans;
	if(n%2)
	{
        ans=(1+a)*sumofgp((a*a)%m,(n-1)/2,m);
	}
    else
    {
        ans=1+((a*(1+a))%m)*sumofgp((a*a)%m,n/2-1,m);
    }
    return ans%m;
}
// void checktime()
// {
// 	struct timespec ts;
// 	printf("Running Program\n");
// 	clock_gettime(CLOCK_MONOTONIC_RAW,&ts);
// 	long double st=ts.tv_nsec/(1e9)+ts.tv_sec;
// 	// Call Funcn Here
// 	clock_gettime(CLOCK_MONOTONIC_RAW,&ts);
// 	long double en=ts.tv_nsec/(1e9)+ts.tv_sec;
// 	printf("Program ended\nTime = %Lf\n",en-st);
// }

ll getSum(ll BITree[], ll index) 
{ 
    ll sum = 0; // Initialize result 
  
    // index in BITree[] is 1 more than the index in arr[] 
    index = index + 1; 
  
    // Traverse ancestors of BITree[index] 
    while (index>0) 
    { 
        // Add current element of BITree to sum 
        sum += BITree[index]; 
  
        // Move index to parent node in getSum View 
        index -= index & (-index); 
    } 
    return sum; 
} 
  
// Updates a node in Binary Index Tree (BITree) at given 
// index in BITree.  The given value 'val' is added to 
// BITree[i] and all of its ancestors in tree. 
void updateBIT(ll BITree[], ll n, ll index, ll val) 
{ 
    // index in BITree[] is 1 more than the index in arr[] 
    index = index + 1; 
  
    // Traverse all ancestors and add 'val' 
    while (index <= n) 
    { 
        // Add 'val' to current node of BI Tree 
        BITree[index] += val; 
  
        // Update index to that of parent in update View 
        index += index & (-index); 
    } 
} 
  
// Returns the sum of array from [0, x] 
ll sum(ll x, ll BITTree1[], ll BITTree2[]) 
{ 
    return (getSum(BITTree1, x) * x) - getSum(BITTree2, x); 
} 
  
  
void updateRange(ll BITTree1[], ll BITTree2[], ll n, 
                 ll val, ll l, ll r) 
{ 
    // Update Both the Binary Index Trees 
    // As discussed in the article 
  
    // Update BIT1 
    updateBIT(BITTree1,n,l,val); 
    updateBIT(BITTree1,n,r+1,-val); 
  
    // Update BIT2 
    updateBIT(BITTree2,n,l,val*(l-1)); 
    updateBIT(BITTree2,n,r+1,-val*r); 
} 
  
ll rangeSum(ll l, ll r, ll BITTree1[], ll BITTree2[]) 
{ 
    // Find sum from [0,r] then subtract sum 
    // from [0,l-1] in order to find sum from 
    // [l,r] 
    return sum(r, BITTree1, BITTree2) - 
           sum(l-1, BITTree1, BITTree2); 
} 
  
  
ll *constructBITree(ll n) 
{ 
    // Create and initialize BITree[] as 0 
    ll *BITree = new ll[n+1]; 
    for (ll i=1; i<=n; i++) 
        BITree[i] = 0; 
  
    return BITree; 
} 

mp arr[200005];
ll arr1[200005],arr2[200005];
ll cel(ll a,ll b)
{
	return (a+b-1)/b;
}
int main(void)
{
	fastio
	ll n,d,a;
	cin>>n>>d>>a;
	forl(i,n)
	{
		cin>>arr[i].first>>arr[i].second;
	}
	sort(arr,arr+n);
	forl(i,n)
	{
		arr1[i] = arr[i].first;
		arr2[i] = arr[i].second;
	}
	ll *BITTree1 = constructBITree(n) , *BITTree2 = constructBITree(n);
	forl(i,n)
	{
		updateRange(BITTree1,BITTree2,n,arr2[i],i,i);
	}
	ll ans = 0;
	forl(i,n)
	{
		ll x = rangeSum(i,i,BITTree1,BITTree2);
		if(x>0)
		{
			ans += cel(x,a);
			updateRange(BITTree1,BITTree2,n,-cel(x,a)*a,i,(ll)(upper_bound(arr1,arr1+n,arr1[i]+2*d) - arr1 - 1));
		}
	}
	cout<<ans<<"\n";
	return 0;
}

Measured memory_bytes: 9600