#include <bits/stdc++.h>
using namespace std;
int n, t, ans = 2;
double x, y;
struct node {
  double l, r;
} a[1005];
bool cmp(node b, node c) {
  if (b.l != c.l)
    return b.l < c.l;
  else
    return b.r < c.r;
}
int main() {
  scanf("%d %d", &n, &t);
  for (int i = 1; i <= n; i++) {
    scanf("%lf %lf", &x, &y);
    a[i].l = (double)x - y / 2.0;
    a[i].r = (double)x + y / 2.0;
  }
  sort(a + 1, a + 1 + n, cmp);
  for (int i = 2; i <= n; i++) {
    if (a[i].l - a[i - 1].r > t)
      ans = ans + 2;
    else if (a[i].l - a[i - 1].r == t)
      ans++;
  }
  printf("%d", ans);
  return 0;
}
