#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int res = 2;
  vector<pair<double, double>> vec;
  double n, t;
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    double x, a;
    cin >> x >> a;
    vec.push_back({x, a});
  }
  sort(vec.begin(), vec.end());
  for (int i = 0; i < n - 1; i++) {
    double curr = vec[i].first + vec[i].second / 2;
    double nxt = vec[i + 1].first - vec[i + 1].second / 2;
    double dis = nxt - curr;
    if (dis == t)
      res++;
    else if (dis >= t)
      res += 2;
  }
  cout << res;
  return 0;
}
