#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long n, t;
  cin >> n >> t;
  long long i = n, j;
  vector<pair<float, float> > v;
  float x, a;
  while (i--) {
    cin >> x >> a;
    pair<float, float> p = make_pair(x - a / 2, x + a / 2);
    v.push_back(p);
  }
  sort(v.begin(), v.end());
  if (n == 1)
    cout << "2\n";
  else {
    int count = 2;
    float d;
    for (i = 0; i < n - 1; ++i) {
      d = v[i + 1].first - v[i].second;
      if (d < t)
        continue;
      else if (d == t)
        ++count;
      else
        count += 2;
    }
    cout << count << "\n";
  }
  return 0;
}
