#include <bits/stdc++.h>
using namespace std;
struct pos {
  double x;
  double len;
};
bool cmp(pos a, pos b) { return a.x < b.x; }
int main() {
  ios::sync_with_stdio(false);
  int n;
  double t;
  cin >> n >> t;
  pos point[n];
  for (int i = 0; i < n; ++i) {
    cin >> point[i].x >> point[i].len;
  }
  sort(point, point + n, cmp);
  int ans = 2;
  double fx = point[0].x;
  double flen = point[0].len;
  for (int i = 1; i < n; ++i) {
    if ((point[i].x - point[i].len / 2.0) - (fx + flen / 2.0) > t) {
      ans += 2;
    } else if ((point[i].x - point[i].len / 2.0) - (fx + flen / 2.0) == t) {
      ans += 1;
    }
    fx = point[i].x;
    flen = point[i].len;
  }
  cout << ans;
  return 0;
}
