#include <bits/stdc++.h>
struct village {
  int x;
  double a;
} v[1000];
int cmp(const void *x, const void *y) {
  struct village *p = (struct village *)x;
  struct village *q = (struct village *)y;
  return p->x - q->x;
}
void func(int n, int t) {
  int i, ans = 2;
  qsort(v, n, sizeof(struct village), cmp);
  for (i = 0; i < n - 1; i++) {
    if (v[i].x + v[i].a / 2 + t < v[i + 1].x - v[i + 1].a / 2) {
      ans += 2;
    } else if (v[i].x + v[i].a / 2 + t == v[i + 1].x - v[i + 1].a / 2) {
      ans++;
    }
  }
  printf("%d\n", ans);
}
int main(int argc, char **argv) {
  int n, t, i;
  while (scanf("%d%d", &n, &t) == 2) {
    for (i = 0; i < n; i++) {
      scanf("%d%lf", &v[i].x, &v[i].a);
    }
    func(n, t);
  }
  return 0;
}
