#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  double t, x, s;
  cin >> n >> t;
  vector<pair<double, double> > v;
  while (n--) {
    cin >> x >> s;
    pair<double, double> c(x - (s / 2), x + (s / 2));
    v.push_back(c);
  }
  sort(v.begin(), v.end());
  long long sum = 2;
  double k, b;
  for (int i = 0; i < v.size() - 1; i++) {
    k = v[i + 1].first - v[i].second;
    if (k >= t) {
      if (k > t)
        sum += 2;
      else
        sum++;
    }
  }
  cout << sum << endl;
}
