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