#include <bits/stdc++.h>
int main() {
  int n, t, pos = 0;
  std::cin >> n >> t;
  std::vector<std::pair<int, int> > vec;
  for (int i = 0; i < n; i++) {
    int x, y;
    std::cin >> x >> y;
    vec.push_back(std::make_pair(x, y));
  }
  std::sort(vec.begin(), vec.end());
  for (int i = 0; i < n - 1; i++) {
    int temp = 2 * vec[i + 1].first - 2 * vec[i].first - vec[i + 1].second -
               vec[i].second;
    if (temp >= 2 * t) {
      pos++;
    }
    if (temp > 2 * t) {
      pos++;
    }
  }
  std::cout << pos + 2;
  return 0;
}
