#include <bits/stdc++.h>
using namespace std;
double a[1010], b[1010];
int main() {
  double t;
  int n, i, ans = 2;
  cin >> n >> t;
  for (i = 0; i < n; i++) {
    float xi, ai;
    cin >> xi >> ai;
    a[i] = xi - ai / 2;
    b[i] = xi + ai / 2;
  }
  sort(a, a + n);
  sort(b, b + n);
  for (i = 0; i < n - 1; i++) {
    double d = a[i + 1] - b[i];
    if (d > t)
      ans += 2;
    else if (d == t)
      ans++;
  }
  cout << ans << endl;
}
