#include <bits/stdc++.h>
using namespace std;
class data {
 public:
  double x1, x2;
  bool operator<(const data& d) const { return x1 < d.x1; }
  data(double a, double b) : x1(a), x2(b){};
};
int main() {
  int n;
  double t;
  vector<data> v;
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    double a, b;
    cin >> a >> b;
    v.push_back(data(a - b / 2, a + b / 2));
  }
  sort(v.begin(), v.end());
  int cnt = 2;
  for (int i = 0; i < v.size(); i++) {
    if (i != 0) {
      if (v[i].x1 - t >= v[i - 1].x2) {
        cnt++;
      }
      if (fabs(v[i].x1 - t - v[i - 1].x2) < 10e-6) {
        cnt--;
      }
    }
    if (i != v.size() - 1) {
      if (v[i].x2 + t <= v[i + 1].x1) {
        cnt++;
      }
    }
  }
  cout << cnt << endl;
  return 0;
}
