#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d = 0, e = 0, f = 0, g = 0, i, j, k = 1, l = 1, r = 1,
                     n[300001], m[300001], q, u, v, w, y, z[400001], h[400001],
                     p[500001];
  string s, t, x;
  cin >> a >> b >> c;
  for (i = 1; i <= a; i++) {
    cin >> d >> e;
    f += (d - g) / c;
    g = d + e;
  }
  cout << f + ((b - g) / c);
}
