#include <bits/stdc++.h>
struct house {
  double x, s;
} a[1010];
int main() {
  using namespace std;
  int k, c = 2;
  house p;
  double n, t;
  cin >> n >> t;
  for (int i = 0; i < n; i++) cin >> a[i].x >> a[i].s;
  for (int i = 0; i < n - 1; i++) {
    k = i;
    for (int j = i + 1; j < n; j++)
      if (a[k].x > a[j].x) k = j;
    if (k != i) {
      p = a[i];
      a[i] = a[k];
      a[k] = p;
    }
  }
  for (int i = 1; i < n; i++)
    if ((a[i].x - a[i].s / 2 - a[i - 1].x - a[i - 1].s / 2) > t)
      c += 2;
    else if ((a[i].x - a[i].s / 2 - a[i - 1].x - a[i - 1].s / 2) - t < 0)
      c += 0;
    else
      c += 1;
  cout << c << endl;
  return 0;
}
