#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, t, i, j;
  cin >> n >> t;
  long long x, y;
  vector<pair<long long, long long> > v;
  for (i = 0; i < n; ++i) {
    cin >> x >> y;
    v.push_back({x, y});
  }
  sort(v.begin(), v.end());
  long long count = 2;
  double idx = (double)v[0].first + (double)v[0].second / 2.0;
  double idx2;
  for (i = 1; i < n; ++i) {
    idx2 = (double)v[i].first - (double)v[i].second / 2.0;
    if (idx2 - idx > t)
      count += 2;
    else if (idx2 - idx == t)
      count += 1;
    idx = (double)v[i].first + (double)v[i].second / 2.0;
  }
  cout << count << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
