#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 4;
const int mod = 1e9 + 7;
long long modularExponentiation(long long x, long long n, long long mod) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % mod;
    x = (x * x) % mod;
    n = n / 2;
  }
  return result;
}
void batman() {
  int n, t;
  cin >> n >> t;
  vector<pair<float, float>> v;
  for (int i = 0; i < n; i++) {
    float c, l;
    cin >> c >> l;
    v.push_back(make_pair(c - l / 2, c + l / 2));
  }
  int c = 2;
  sort(v.begin(), v.end());
  ;
  for (int i = 1; i < n; i++) {
    if (abs(v[i].first - v[i - 1].second) > t) c += 2;
    if (abs(v[i].first - v[i - 1].second) == t) c++;
  }
  cout << c << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  batman();
  return 0;
}
