#include <bits/stdc++.h>
#define rep(i,n) for(int64_t i=0;i < (int64_t)(n);i++)
#define invrep(i,n) for(int64_t i=n-1;i >= 0L;i--)
#define positiverep(i,n) for(int64_t i=1;i <= (int64_t)(n);i++)
using namespace std;


//////全探索したいときに開けよ////////
vector<vector<int>> fspattern;
vector<int> fspattern_draft;
int fspcnt = 0;

void setfspattern_core(int floor,int number,int degree){
  if(floor==degree){
    fspattern.at(fspcnt) = fspattern_draft;
    fspcnt++;
  }else{
    rep(i,number){
      fspattern_draft.at(floor) = i;
      setfspattern_core(floor+1,number,degree);
    }
  }
}

void setfspattern(int number,int degree){
  int64_t array_num = 1;
  rep(i,degree){
    array_num *= number;
  }
  fspattern = vector<vector<int>>(array_num,vector<int>(degree));
  fspattern_draft = vector<int>(degree);
  setfspattern_core(0,number,degree);
}

//////nCrのmodを求めたいときに開けよ/////////
//int64_t univMod = 1000000007;
//int64_t factnum = 100000
//vector<int64_t> modfact(factnum);
//vector<int64_t> modinvfact(factnum);

/*void setmodfact(){
  for(int i=0;i<factnum;i++){
    if(i == 0){
      modfact.at(i) = 1;
    }else{
      modfact.at(i) = (modfact.at(i-1)*i)%univMod;
    }
  }
}

int64_t calcmodpower(int64_t a,int64_t n){
  int64_t res = 1;
  while(n != 0){
    if(n & 1){
      res = (res * a) % univMod;
    }
    a = (a*a) % univMod;
    n = n >> 1;
  }
  return res;
}

int64_t calcinverse(int64_t n){
	return calcmodpower(n,univMod-2);
}

void setmodinvfact(){
  for(int i=0;i<factnum;i++){
    if(i==0){
      modinvfact.at(i) = 1;
    }else{
      modinvfact.at(i) = calcmodpower(modfact.at(i),univMod-2);
    }
  }
}

int64_t calcmodcomb(int64_t n,int64_t r){
  return (((modfact.at(n)*modinvfact.at(r))%univMod)*modinvfact.at(n-r))%univMod;
}

int64_t calcmodpositive(int64_t n){
  return (n + ((abs(n)+univMod-1)/univMod)*univMod)%univMod;
}
  
    */


/*
int64_t calcGCD(int64_t a,int64_t b){
	int64_t p = a;
	int64_t q = b;
	int64_t c = a%b;
	while(c != 0){
		p = q;
		q = c;
		c = p%q;
	}
	return q;
}
*/
bool cmp1(const pair<int64_t,int64_t> &a,const pair<int64_t,int64_t> &b){
  return a.first < b.first;
}
bool cmp2(const pair<int64_t,int64_t> &a,const pair<int64_t,int64_t> &b){
  return a.second < b.second;
}

int main(){
  int64_t n,d,a;
  cin >> n >> d >> a;
  vector<pair<int64_t,int64_t>> xh(n);
  rep(i,n){
    int64_t hoge1,hoge2;
    cin >> hoge1 >> hoge2;
    xh.at(i) = make_pair(hoge1,(hoge2+a-1)/a);
  }
  //sort(xh.begin(),xh.end(),cmp2);
  sort(xh.begin(),xh.end(),cmp1);
  vector<int64_t> dmgcnt(n);
  int64_t damage = 0;
  int64_t damagetotal = 0;
  rep(i,n){
    //printf("%ld 's HP = %ld\n",i,xh.at(i).second - damage);
    if(damage < xh.at(i).second){
      auto itr = upper_bound(xh.begin(),xh.end(), make_pair(xh.at(i).first + 2*d,xh.at(i).second),cmp1);
      int64_t iii = distance(xh.begin(),itr);
      dmgcnt.at(i) +=  xh.at(i).second - damage;
      //cout << iii << endl;
      if(iii <= n-1){
        dmgcnt.at(iii) -= xh.at(i).second - damage;
      }
      damagetotal += xh.at(i).second - damage;
      
      damage += xh.at(i).second - damage;
      if(i+1 < n) damage += dmgcnt.at(i+1);
      //cout << "###" << damage << endl;
    }else{
      if(i+1 < n) damage += dmgcnt.at(i+1);
      //cout << "###" << damage << endl;
    }
    //cout << "///" << damagetotal << endl;
  }
  /*damage += dmgcnt.at(n-2);
  if(damage < xh.at(n-1).second){
    damagetotal += xh.at(n-1).second - damage;
    damagetotal += xh.at(n-1).second - damage;
  }*/
    
  cout << damagetotal << endl;
    
    
    
    
                           

}

Measured memory_bytes: 4992