#include <bits/stdc++.h>
using namespace std;
pair<int, int> h[1000];
int main() {
  int n, a, i, j;
  cin >> n >> a;
  a *= 2;
  for (i = 0; i < n; i++) {
    cin >> h[i].first >> h[i].second;
    h[i].first *= 2;
  }
  sort(h, h + n);
  int ans = 2;
  for (i = 0; i < n - 1; i++) {
    int d = h[i + 1].first - h[i].first - h[i].second - h[i + 1].second;
    if (d < a) continue;
    ans++;
    if (d > a) ++ans;
  }
  cout << ans << endl;
  return 0;
}
