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