#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  double t, loc, side;
  pair<double, double> P[1005];
  while (cin >> n >> t) {
    for (int i = 0; i < n; i++) {
      cin >> loc >> side;
      P[i].first = loc - (side / 2);
      P[i].second = loc + (side / 2);
    }
    sort(P, P + n);
    int cnt = 0;
    for (int i = 1; i < n; i++) {
      if ((P[i].first - P[i - 1].second) > t) {
        cnt += 2;
      } else if ((P[i].first - P[i - 1].second) == t) {
        cnt++;
      }
    }
    cout << cnt + 2 << endl;
  }
  return 0;
}
