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