#include <bits/stdc++.h>
using namespace std;
struct MyStruct {
  double x, y;
  friend bool operator<(MyStruct n1, MyStruct n2) { return n1.x < n2.x; }
};
MyStruct myArray[1005];
int main() {
  double n, t, sum, temp;
  int i;
  while (cin >> n >> t) {
    for (i = 0; i < n; i++) {
      cin >> myArray[i].x >> myArray[i].y;
    }
    sort(myArray, myArray + int(n));
    sum = 0;
    for (i = 1; i < n; i++) {
      temp = (myArray[i].x - (myArray[i].y / 2)) -
             (myArray[i - 1].x + (myArray[i - 1].y / 2) + t);
      if (temp > 0) {
        sum += 2;
      } else if (temp == 0)
        sum += 1;
    }
    cout << sum + 2 << endl;
  }
  return 0;
}
