#include <bits/stdc++.h>
int ans = 2, n, t;
double m;
struct T {
  int x, t;
} a[1111];
bool my(T a, T b) { return (a.x < b.x); }
int main() {
  scanf("%d%d", &n, &t);
  for (int i = 1; i <= n; i++) scanf("%d%d", &a[i].x, &a[i].t);
  std::sort(a + 1, a + n + 1, &my);
  for (int i = 2; i <= n; i++) {
    m = a[i].x - a[i - 1].x - (double)a[i].t / 2 - (double)a[i - 1].t / 2;
    if (m > t)
      ans += 2;
    else if (m == t)
      ++ans;
  }
  printf("%d\n", ans);
  return 0;
}
