#include <bits/stdc++.h>
using namespace std;
pair<double, double> p[10001];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, t;
  cin >> n >> t;
  for (int i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  sort(p, p + n);
  int y = 2;
  for (int i = 0; i < n - 1; i++) {
    if (p[i].first + p[i].second / 2 + t < p[i + 1].first - p[i + 1].second / 2)
      y += 2;
    else if (p[i].first + p[i].second / 2 + t ==
             p[i + 1].first - p[i + 1].second / 2)
      y += 1;
  }
  cout << y;
  return 0;
}
