#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
int main() {
  int n, t;
  cin >> n >> t;
  vector<pair<double, double>> arr;
  for (int(i) = 0; (i) < (n); (i)++) {
    double x, a;
    cin >> x >> a;
    arr.push_back(make_pair(x, a));
  }
  sort((arr).begin(), (arr).end(), cmp);
  int ans = 2;
  for (int(i) = 0; (i) < (n - 1); (i)++) {
    double d = (arr[i + 1].first - arr[i + 1].second / 2.0) -
               (arr[i].first + arr[i].second / 2.0);
    if (d > t) {
      ans += 2;
    } else if (d == t) {
      ans++;
    }
  }
  cout << ans;
  return 0;
}
