#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, t, x, a, s = 1, l, r;
  priority_queue<double, vector<double>, greater<double>> h;
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    cin >> x >> a;
    h.push(x + a / 2.0);
    h.push(x - a / 2.0);
  }
  h.pop();
  while (h.size() > 1) {
    l = h.top();
    h.pop();
    r = h.top();
    h.pop();
    if (r - l > t) {
      s++;
      s++;
    } else if (r - l - t <= 0.1 && r - l - t >= -0.1)
      s += 1;
  }
  cout << s + 1 << endl;
  return 0;
}
