#include <bits/stdc++.h>
using namespace std;
pair<double, double> p[1000 + 10];
int main() {
  int n, t;
  while (cin >> n >> t) {
    for (int i = 0; i < n; i++) {
      cin >> p[i].first >> p[i].second;
    }
    sort(p, p + n);
    int ans = 2;
    for (int i = 1; i < n; i++) {
      if (p[i].first - p[i].second * 1.0 / 2 - p[i - 1].first -
              p[i - 1].second * 1.0 / 2 ==
          t)
        ans++;
      else if (p[i].first - p[i].second * 1.0 / 2 - p[i - 1].first -
                   p[i - 1].second * 1.0 / 2 >
               t) {
        ans += 2;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
