#include <cstdio>
#include <algorithm>
#include <utility>
#include <queue>

using namespace std;
typedef long long ll;

ll N, D, A, X, H, a, b, d, ans;
priority_queue<pair<ll, ll>, vector<pair<ll, ll> >, greater<pair<ll, ll> > > pq;

int main() {
  scanf("%lld %lld %lld", &N, &D, &A);
  for (ll i = 0; i < N; i++) {
    scanf("%lld %lld", &X, &H);
    pq.push(make_pair(X+D+1, (H+A-1)/A));
  }
  while (pq.size()) {
    a = pq.top().first;
    b = pq.top().second;
    pq.pop();
    if (b > d) {
      ans += b - d;
      pq.push(make_pair(a+2*D+1, d - b));
      d = b;
    }
    if (b < 0) d += b;
  }

  printf("%lld\n", ans);
}
