#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, t, c, l;
  cin >> n >> t;
  int res = 2;
  vector<pair<double, double> > bl(n);
  for (int i = 0; i < n; i++) {
    cin >> c >> l;
    bl[i].first = (c - l / 2);
    bl[i].second = c + l / 2;
  }
  sort(bl.begin(), bl.end());
  for (int i = 1; i < n; i++) {
    if (bl[i].first - bl[i - 1].second > t)
      res += 2;
    else if ((bl[i].first - bl[i - 1].second == t))
      res++;
  }
  cout << res << endl;
}
