#include <bits/stdc++.h>
using namespace std;
struct house {
  int hx;
  int l;
};
int main() {
  vector<house> city;
  int n;
  cin >> n;
  int length;
  cin >> length;
  for (int i = 0; i < n; i++) {
    int h, len;
    cin >> h >> len;
    house x;
    x.hx = h;
    x.l = len;
    if (city.size() == 0) {
      city.push_back(x);
    } else {
      int k = 0;
      while (x.hx > city[k].hx) {
        k++;
      }
      for (int m = k; m < city.size(); m++) {
        swap(x, city[m]);
      }
      city.push_back(x);
    }
  }
  int count = 2;
  for (int i = 0; i < city.size() - 1; i++) {
    if ((city[i + 1].hx - city[i].hx - length) * 2 ==
        city[i + 1].l + city[i].l) {
      count++;
    } else if ((city[i + 1].hx - city[i].hx - length) * 2 >
               city[i + 1].l + city[i].l) {
      count += 2;
    }
  }
  cout << count << endl;
  return 0;
}
