#include <bits/stdc++.h>
typedef struct {
  float a;
  float b;
} PLACE;
int compare(const void* argu1, const void* argu2) {
  return ((PLACE*)argu1)->a - ((PLACE*)argu2)->a;
}
int main(void) {
  int n;
  float t;
  int amount = 2;
  scanf("%d%f", &n, &t);
  PLACE place[n];
  for (int i = 0; i < n; i++) {
    float x, y;
    scanf("%f%f", &x, &y);
    place[i].a = x - y / 2;
    place[i].b = place[i].a + y;
  }
  qsort(place, n, sizeof(place[0]), compare);
  for (int i = 0; i < n - 1; i++) {
    if (place[i + 1].a - place[i].b > t)
      amount += 2;
    else if (place[i + 1].a - place[i].b == t)
      amount++;
  }
  printf("%d", amount);
  return 0;
}
