#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<float, float> > v;
  float i, n, t, a, b, cnt = 0;
  cin >> n >> t;
  for (i = 0; i < n; i++) {
    cin >> a >> b;
    v.push_back(make_pair(a, b));
  }
  sort(v.begin(), v.end());
  float pre = ((float)v[0].second / 2.0) + v[0].first;
  for (i = 1; i < n; i++) {
    float po = v[i].first - ((float)v[i].second / 2.0);
    if (po - pre == t) cnt++;
    if (po - pre > t) cnt += 2;
    pre = (v[i].second / 2) + v[i].first;
  }
  cnt += 2;
  cout << cnt;
  return 0;
}
