#include <bits/stdc++.h>
const int INF = 1000000009;
using namespace std;
int b[2000];
struct data {
  double l, r;
};
bool operator<(const data& a, const data& b) { return a.l < b.l; }
int main() {
  int n, t, i, j, c = 2;
  double x[2000], a[2000];
  data p[2000];
  cin >> n >> t;
  for (i = 1; i <= n; i++) {
    cin >> x[i] >> a[i];
    p[i].l = x[i] - a[i] / 2;
    p[i].r = x[i] + a[i] / 2;
  }
  sort(p + 1, p + n + 1);
  for (i = 1; i <= n; i++) {
    if (p[i].r + t <= p[i + 1].l && i != n) c++;
    if (i != 1 && p[i].l - t > p[i - 1].r) c++;
  }
  cout << c << endl;
  return 0;
}
