#include <bits/stdc++.h>
using namespace std;
int n, ans;
float x, dis, t;
struct ponto {
  float ini, fim;
  bool operator<(const ponto &lhs) const { return lhs.ini > ini; }
} p[1010];
int main() {
  scanf("%d%f", &n, &t);
  ans = 2;
  for (int i = 0; i < n; i++) {
    scanf("%f%f", &x, &dis);
    dis /= 2.0;
    p[i].ini = x - dis;
    p[i].fim = x + dis;
  }
  sort(p, p + n);
  for (int i = 1; i < n; i++) {
    if (p[i - 1].fim + t < p[i].ini)
      ans += 2;
    else if (p[i - 1].fim + t == p[i].ini)
      ans++;
  }
  printf("%d\n", ans);
  return 0;
}
