#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
pair<int, int> p[N];
int n, l, ans;
double h1;
int main() {
  cin >> n >> l;
  for (int i = 1; i <= n; i++) {
    cin >> p[i].first >> p[i].second;
  }
  sort(p + 1, p + n + 1);
  for (int i = 1; i < n; i++) {
    h1 = p[i + 1].first - p[i + 1].second / 2.0 -
         (p[i].first + p[i].second / 2.0);
    abs(h1);
    if (h1 > l)
      ans += 2;
    else if (h1 == l)
      ans++;
  }
  cout << 2 + ans << endl;
}
