#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<cstdio>
#include<cmath>
#include<deque>
#include<numeric>
#include<queue>
#include<stack>
#include<cstring>
#include<limits>
#include<functional>
#include<unordered_set>
#include<iomanip>
#include<cassert>
#include<regex>
#include<bitset>
#include<complex>
#include<chrono>
#define rep(i,a) for(int i=(int)0;i<(int)a;++i)
#define pb push_back
#define eb emplace_back
using ll=long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;
 
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
 
using namespace std;
 
template <typename A, typename B>
string to_string(pair<A, B> p);
 
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
 
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
 
string to_string(const string& s) {
  return '"' + s + '"';
}
 
string to_string(const char* s) {
  return to_string((string) s);
}
 
string to_string(bool b) {
  return (b ? "true" : "false");
}
 
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
 
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
 
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
 
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
 
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}
 
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
 
void debug_out() { cerr << "\n"; }
 
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " <<to_string(H);
  debug_out(T...);
}
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

struct LazySegmentTree{//区間加算,区間和クエリ,0オリジン
    private:
        int n;
        vector<ll>node,lazy;
    
    public:
        LazySegmentTree(vector<ll>v){
            int sz=(int)v.size();
            n=1;
            while(n<sz)n*=2;
            node.resize(2*n-1);
            lazy.resize(2*n-1,0);

            for(int i=0;i<sz;i++)node[i+n-1]=v[i];
            for(int i=n-2;i>=0;--i)node[i]=node[2*i+1]+node[2*i+2];
        }

        //k番目のノードについて遅延評価
        void eval(int k,int l,int r){
            //遅延配列が空でなければ値の伝播が起こる
            if(lazy[k]!=0){
                node[k]+=lazy[k];

                if(r-l>1){//最下段かどうかの確認
                    lazy[2*k+1]+=lazy[k]/2;
                    lazy[2*k+2]+=lazy[k]/2;
                    //子ノードは親ノードの半分の範囲なので値も半分
                }

                lazy[k]=0;//空にする
            }
        }

        void add(int a,int b,ll x,int k=0,int l=0,int r=-1){
            if(r<0)r=n;

            //k番目のノードに遅延評価
            eval(k,l,r);

            //範囲外
            if(b<=l||r<=a)return;

            //完全に被覆しているなら遅延配列に代入した後に評価
            if(a<=l&&r<=b){
                lazy[k]+=(r-l)*x;
                eval(k,l,r);
            }

            //それ以外なら子ノードを再帰的に計算
            else{
                add(a,b,x,2*k+1,l,(l+r)/2);
                add(a,b,x,2*k+2,(l+r)/2,r);
                node[k]=node[2*k+1]+node[2*k+2];
            }
        }

        ll getsum(int a,int b,int k=0,int l=0,int r=-1){//区間和の取得
            if(r<0)r=n;
            if(b<=l||r<=a)return 0;

            eval(k,l,r);
            if(a<=l&&r<=b)return node[k];
            ll vall=getsum(a,b,2*k+1,l,(l+r)/2);
            ll valr=getsum(a,b,2*k+2,(l+r)/2,r);
            return vall+valr;
        }
};


using P=pair<ll,ll>;
void solve(){
  ll n,d,a;
  cin>>n>>d>>a;
  vector<P>p(n);
  rep(i,n)cin>>p[i].first>>p[i].second;
  sort(p.begin(),p.end());
  vector<ll>x(n);
  rep(i,n)x[i]=p[i].first;
  vector<ll>v(n);
  LazySegmentTree seg(v);
  ll ans=0;
  rep(i,n){
    ll y=seg.getsum(i,i+1);
    if(p[i].second+y>0){
      p[i].second+=y;
      ll bomb=(p[i].second+a-1)/a;
      ans+=bomb;
      int r=upper_bound(x.begin(),x.end(),x[i]+2*d)-x.begin();
      seg.add(i,r,-a*bomb);
    }
  }
  cout<<ans;
}

int main(){
	ios::sync_with_stdio(false);
  cin.tie(0);
	cout<<fixed<<setprecision(15);
	solve();
	return 0;
}


Measured memory_bytes: 16256