#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
const double zero = 1e-6;
struct node {
  double x, a, l, r;
} p[N];
int cmp(node a, node b) { return a.l < b.l; }
int main() {
  int n, t;
  while (cin >> n >> t) {
    for (int i = 1; i <= n; ++i) {
      cin >> p[i].x >> p[i].a;
      p[i].l = p[i].x - p[i].a / 2.0;
      p[i].r = p[i].l + p[i].a;
    }
    sort(p + 1, p + 1 + n, cmp);
    int ans = 2;
    for (int i = 1; i < n; ++i) {
      if (p[i + 1].l - p[i].r > t + zero)
        ans += 2;
      else if (fabs(p[i + 1].l - p[i].r - t - zero) <= zero)
        ans++;
    }
    cout << ans << endl;
  }
  return 0;
}
