#include <bits/stdc++.h>
using namespace std;
long long dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
long long ddx[8] = {1, 1, 0, -1, -1, -1, 0, 1},
          ddy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
long long gcd(long long a, long long b) {
  if (!a) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
const long long template_array_size = 1e6 + 2047;
const long long N = 1e5 + 6;
const long long mod = 1e9 + 7;
long long mul(long long a, long long b) { return (a % mod) * (b % mod) % mod; }
long long add(long long a, long long b) { return (a + b) % mod; }
long long sub(long long a, long long b) {
  return (a % mod - b % mod + mod) % mod;
}
long long divide(long long a, long long b) {
  return a * (long long)pow(b, mod - 2) % mod;
}
void test_case() {
  long long n;
  double t;
  cin >> n >> t;
  vector<pair<double, double>> arr(n);
  for (long long i = 0; i < (long long)(n); i++) {
    cin >> arr[i].first;
    cin >> arr[i].second;
  }
  if (n == 1) {
    cout << 2 << "\n";
    return;
  }
  sort(arr.begin(), arr.end());
  long long ans = 2;
  long long temp = 0;
  for (long long i = 0; i < n; i++) {
    if (i == 0) {
      double dist = arr[i + 1].first - arr[i].first - arr[i].second / 2 -
                    arr[i + 1].second / 2;
      if (dist == t) {
        temp++;
      } else if (dist > t) {
        ans++;
      }
    } else if (i == n - 1) {
      double dist = arr[i].first - arr[i - 1].first - arr[i].second / 2 -
                    arr[i - 1].second / 2;
      if (dist == t) {
        temp++;
      } else if (dist > t) {
        ans++;
      }
    } else {
      double dist = arr[i + 1].first - arr[i].first - arr[i].second / 2 -
                    arr[i + 1].second / 2;
      if (dist == t) {
        temp++;
      } else if (dist > t) {
        ans++;
      }
      dist = arr[i].first - arr[i - 1].first - arr[i].second / 2 -
             arr[i - 1].second / 2;
      if (dist == t) {
        temp++;
      } else if (dist > t) {
        ans++;
      }
    }
  }
  cout << ans + temp / 2 << "\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(20);
  long long t = 1;
  while (t--) {
    test_case();
  }
}
