#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<int, int> > a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  sort(a.begin(), a.end(), cmp);
  int ret = 2;
  for (int i = 1; i < n; i++) {
    if (a[i].first - a[i - 1].first - (a[i].second + a[i - 1].second) / 2.0 >
        t) {
      ret += 2;
    } else if (a[i].first - a[i - 1].first -
                   (a[i].second + a[i - 1].second) / 2.0 ==
               t) {
      ret += 1;
    }
  }
  cout << ret << endl;
}
