#include <bits/stdc++.h>
using namespace std;
struct node {
  double l, r;
} s[1005];
int cmp(const node &a, const node &b) { return a.l < b.l; }
int main() {
  int i, n, total;
  double x, a, b, t;
  while (cin >> n >> t) {
    total = 2;
    for (i = 0; i < n; i++) {
      cin >> x >> a;
      s[i].l = x - a / 2.0;
      s[i].r = x + a / 2.0;
    }
    sort(s, s + n, cmp);
    b = s[0].r;
    for (i = 1; i < n; i++) {
      if (s[i].l - b > t)
        total += 2;
      else if (s[i].l - b == t)
        total++;
      b = s[i].r;
    }
    cout << total << endl;
  }
  return 0;
}
