#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <bitset>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <list>
#include <map>
#include <set>
#include <cmath>
#include <limits>
#include <numeric>
#include <iomanip>
#include <cstdlib>
#include <iterator>
#include <functional>
#include <unordered_map>
#include <unordered_set>

using namespace std;

typedef unsigned                    ui;
typedef int                         si;
typedef long                        sl;
typedef long long                   ll;
typedef unsigned long long          ull;

// ----------------

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 << endl; }

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

// ----------------

class Item {
public:
    ll X;
    ll H;
};

// segment tree
// sqrt decomposition

class SqrtDecomposition {
public:
    void Init(ll n) {
        N = n;
        Factor = ceil(sqrt(N));

        ll size = N / Factor;
        if (size * Factor != N) {
            size += 1;
        }

        debug(N, Factor, size);

        Values.assign(N, 0);
        Deltas.assign(size, 0);
    }

    void Add(ll l, ll r, ll v) {
        const auto get_block_begin = [&](ll i) {
            return i * Factor;
        };

        const auto get_block_end = [&](ll i) {
            return get_block_begin(i + 1) - 1;
        };

        ll l_block = l / Factor;
        ll r_block = r / Factor;

        for (ll i = l_block + 1; i < r_block; ++i) {
            Deltas[i] += v;
        }

        ll to_left = get_block_end(l_block);
        to_left = min(to_left, r);
        for (ll i = l; i <= to_left; ++i) {
            Values[i] += v;
        }

        ll from_right = get_block_begin(r_block);
        from_right = max(l, from_right);
        if (l_block != r_block) {
            for (ll i = from_right; i <= r; ++i) {
                Values[i] += v;
            }
        }

        debug(l, r, l_block, r_block, to_left, from_right);
    }

    ll Get(ll i) {
        return Values[i] + Deltas[i / Factor];
    }

public:
    ll Factor = 0;
    ll N = 0;
    vector<ll> Values;
    vector<ll> Deltas;
};

int main(int argc, char *argv[])
{
    std::ios_base::sync_with_stdio(false);

    ll n, d, A;
    cin >> n >> d >> A;

    vector<Item> a(n);
    for (int i = 0; i < n; ++i) {
        cin >> a[i].X >> a[i].H;
    }

    sort(a.begin(), a.end(), [](const Item& l, const Item& r) {
        return l.X < r.X;
    });

    const auto get_last = [&](ll l, ll x) {
        ll r = n - 1;

        ll answer = -1;
        while (l <= r) {
            const ll m = l + (r - l) / 2;
            if (a[m].X <= x) {
                answer = m;
                l = m + 1;
            } else {
                r = m - 1;
            }
        }

        return answer;
    };

    ll answer = 0;

    SqrtDecomposition s;
    s.Init(n);
    for (int i = 0; i < n; ++i) {
        ll damage = s.Get(i);
        ll diff = a[i].H - damage;

        debug(i, damage, diff);
        if (diff <= 0) {
            continue;
        }

        ll bombs = max((ll) ceil(static_cast<double>(diff) / A), 1LL);
        ll cur = bombs * A;
        ll last = get_last(i, a[i].X + d * 2);

        debug(i, cur, last, s.Get(i));
        if (last >= 0) {
            s.Add(i, last, cur);
        }

        answer += bombs;

        debug(s.Values, s.Deltas);
    }
    cout << answer << endl;

    return 0;
}


Measured memory_bytes: 4992