using namespace std;

#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <bitset>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <stack>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>

typedef long long ll;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;

#define getBit(x,i) (x&(1<<i))
#define setBit(x,i) (x|(1<<i))
#define mem(A,N) memset(A,N,sizeof(A))
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define mp make_pair
#define rep(i, x, y)  for(int i = x; i < y; ++i)
#define Rep(i, x, y)  for(int i = x; i <= y; ++i)
#define srep(i, x, y) for(int i = x; i > y; --i)
#define sRep(i, x, y) for(int i = x; i >= y; --i)
#define All(v) v.begin(),v.end()
#define sortA(a) sort(a, a+n)
#define sortArr(a, i, n) sort(a+i, a+n)
#define SortArr(a, i, n) sort(a+i, a+n+1)
#define Sort(x) sort(x.begin(), x.end())
#define sz(x) ((int)(x).size())
#define len(x) ((int)(x).length())
#define concatenate(a, b) std::copy(b.begin(), b.end(), std::back_inserter(a));
#define fcout(x) cout << fixed << setprecision(x)
#define ifcout(x, a, b) if(x) cout << a << '\n'; else cout << b << '\n'
#define makeUnique(v) v.erase(unique(v.begin(), v.end()), v.end())
#define inRange(a01, b02, c03) (a01 <= b02 && b02 < c03)
#define min3(a01, b02, c03) (min(min(a01, b02), c03))
#define max3(a01, b02, c03) (max(max(a01, b02), c03))

static constexpr int inf = 1'000'000'001;
static constexpr int ninf = -1'000'000'001;
static constexpr long long llInf = 2'000'000'000'000'000'001LL;
static constexpr long long nllInf = -2'000'000'000'000'000'001LL;

static constexpr double Pi = 3.14159265358979323846;
static constexpr double eps = 1e-9;
static constexpr int mod = 1000000007;
static constexpr int mod2 = 1000000006;

// #define Debug_Enabled
#ifdef Debug_Enabled
#define dump(x) cout << #x << " = " << (x) << endl;
#define dump2(x1, x2) cout << #x1 << " = " << x1 << ", " << #x2 << " = " << x2 << endl;
#define dump3(x1, x2, x3) cout << #x1 << " = " << x1 << ", " << #x2 << " = " << x2 << ", " << #x3 << " = " << x3 << endl;
#define dump4(x1, x2, x3, x4) cout << #x1 << " = " << x1 << ", " << #x2 << " = " << x2 << ", " << #x3 << " = " << x3 << ", " << #x4 << " = " << x4 << endl;
#define cout1(x) cout << #x << " = " << (x);
#define commaIter(x) cout << #x << " = " << '(' << x->first << ", " << x->second << "), ";
#define coutIter(x) cout << #x << " = " << '(' << x->first << ", " << x->second << ')';
#define dumpIter(x) cout << #x << " = " << '(' << x->first << ", " << x->second << ')'; cout << endl;
#define comma(x) cout << #x << " = " << (x) << ", ";
#define write(x) cout << #x << " = " << (x);

#define edump(x) cerr << #x << " = " << (x) << endl;
#define edump2(x1, x2) cerr << #x1 << " = " << x1 << ", " << #x2 << " = " << x2 << endl;
#define edump3(x1, x2, x3) cerr << #x1 << " = " << x1 << ", " << #x2 << " = " << x2 << ", " << #x3 << " = " << x3 << endl;
#define edump4(x1, x2, x3, x4) cerr << #x1 << " = " << x1 << ", " << #x2 << " = " << x2 << ", " << #x3 << " = " << x3 << ", " << #x4 << " = " << x4 << endl;
#define ewrite(x) cerr << #x << " = " << (x) << ", ";

#define printSet(s) for(auto itera_tor = s.begin(); itera_tor!=s.end(); itera_tor++) (itera_tor==s.begin())? cout << *itera_tor : cout << ' ' << *itera_tor; cout << endl;
#define printMap(m) for(auto itera_tor = m.begin(); itera_tor!=m.end(); itera_tor++) (itera_tor==m.begin())? cout << '(' << itera_tor->first << ", " << itera_tor->second << ')' \
																						: cout << " (" << itera_tor->first << ", " << itera_tor->second << ')'; cout << endl;
#define printPairSet(s) for(auto itera_tor = s.begin(); itera_tor!=s.end(); itera_tor++) (itera_tor==s.begin())? cout << '(' << itera_tor->first << ", " << itera_tor->second << ')' \
																						: cout << " (" << itera_tor->first << ", " << itera_tor->second << ')'; cout << endl;
#define printPairMap(m) for(auto itera_tor = m.begin(); itera_tor!=m.end(); itera_tor++) (itera_tor==m.begin())? cout << '(' << itera_tor->first.first << ", " << itera_tor->first.second << ": " \
															<< itera_tor->second << ')' : cout << " (" << itera_tor->first.first << ", " << itera_tor->first.second << ": " << itera_tor->second << ')'; cout << endl;

#define coutVector(x) for(auto itera_tor = x.begin(); itera_tor!=x.end(); itera_tor++) (itera_tor==x.begin())? cout << *itera_tor : cout << ' ' << *itera_tor;
#define printVector(x) for(auto itera_tor = x.begin(); itera_tor!=x.end(); itera_tor++) (itera_tor==x.begin())? cout << *itera_tor : cout << ' ' << *itera_tor; cout << endl;
#define commaVector(x) for(auto itera_tor = x.begin(); itera_tor!=x.end(); itera_tor++) (itera_tor==x.begin())? cout << *itera_tor : cout << ' ' << *itera_tor; cout << ", ";
#define printArray(a,x,y) for(auto itera_tor = a+x; itera_tor != a+y; itera_tor++) (itera_tor==a+x)? cout << *itera_tor : cout << ' ' << *itera_tor; cout << endl;
#define PrintArray(a,x,y) for(auto itera_tor = a+x; itera_tor != a+y+1; itera_tor++) (itera_tor==a+x)? cout << *itera_tor : cout << ' ' << *itera_tor; cout << endl;
#
#else

#define dump(x)
#define dump2(x1, x2)
#define dump3(x1, x2, x3)
#define dump4(x1, x2, x3, x4)
#define write(x)

#define edump(x)
#define edump2(x1, x2)
#define edump3(x1, x2, x3)
#define edump4(x1, x2, x3, x4)
#define ewrite(x)

#define printSet(s)
#define printMap(m)
#define printPairSet(s)
#define printPairMap(s)
#define writeVector(x)

#define countVector(x)
#define printVector(x)
#define commaVector(x)
#define printArray(a,x,y)
#define PrintArray(a,x,y)

#endif

// ***************** End Of Template ********************

map<int, int> s;
map<int, int> v;

ll tree[1048576];
ll lazy[1048576];

void updateRangeUtil(int si, int ss, int se, int us,
					 int ue, ll diff)
{

	if (lazy[si] != 0)
	{

		tree[si] += lazy[si] * (se - ss + 1);

		if (ss != se)
		{

			lazy[si*2 + 1]   += lazy[si]; 
			lazy[si*2 + 2]   += lazy[si]; 
		}

		lazy[si] = 0; 
	}

	if (ss>ue || se<us) 
		return;

	if (ss>=us && se<=ue)
	{

		tree[si] += diff * (se - ss + 1); 

		if (ss != se) 
		{

			lazy[si*2 + 1]   += diff; 
			lazy[si*2 + 2]   += diff; 
		}
		return;
	}

	int mid = (ss+se)/2;
	updateRangeUtil(si*2+1, ss, mid, us, ue, diff);
	updateRangeUtil(si*2+2, mid+1, se, us, ue, diff);

	tree[si] = tree[si*2+1] + tree[si*2+2];
}

void updateRange(int n, int us, int ue, ll diff) 
{
	updateRangeUtil(0, 0, n-1, us, ue, diff); 
}

ll getValUtil(int ss, int se, int q, int si) 
{ 

	if (lazy[si] != 0) 
	{ 

		tree[si] += lazy[si] * (se - ss + 1); 

		if (ss != se) 
		{ 

			lazy[si*2+1] += lazy[si]; 
			lazy[si*2+2] += lazy[si]; 
		} 

		lazy[si] = 0; 
	}

	if (ss>=q && se<=q) {
		return tree[si]; 
	}

	int mid = (ss + se)/2;
	if(q <= mid)
		return getValUtil(ss, mid, q, 2*si+1);
	else
		return getValUtil(mid+1, se, q, 2*si+2);
}

ll getVal(int n, int q) 
{
	return getValUtil(0, n-1, q, 0); 
}

int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	int t1, z;
	int n;
	ll d, w;
	cin >> n >> d >> w;
	ll d2 = 2LL * d;
	rep(i, 0, n) {
		cin >> t1 >> z;
		s.insert( {t1, z} );
	}
	
	t1 = 0;
	for(auto it = s.begin(); it != s.end(); it++) {
		v.insert( {it->first, t1} );
		t1++;
	}
	z = t1;
	
	// printMap(v);
	ll sol = 0LL;
	for(auto it = s.begin(); it != s.end(); it++) {
		ll health = it->second;
		int p = v[it->first];
		ll damage = getVal(z, p);
		if(health <= damage) {
			continue;
		}
		else {
			health -= damage;
			
			ll e = ((ll) it->first) + d2;
			int idxE;
			if(e >= 1000000000LL) {
				idxE = z - 1;
			}
			else {
				auto it2 = v.upper_bound(e); it2--;
				idxE = it2->second;
			}
			
			ll bombsNeeded = (health + w - 1) / w;
			sol += bombsNeeded;
			updateRange(z, p, idxE, ((ll) bombsNeeded) * w);
		}
	}
	
	cout << sol << '\n';	
	return 0;
}

Measured memory_bytes: 31360