#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[1005];
int main() {
  int n, t;
  scanf("%d%d", &n, &t);
  t *= 2;
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    a[i] = {x * 2, y * 2};
  }
  sort(a, a + n);
  int ans = 2;
  for (int i = 0; i + 1 < n; i++) {
    int p = a[i].first;
    int l = a[i].second;
    int p1 = a[i + 1].first;
    int l1 = a[i + 1].second;
    int x = p + l / 2 + t;
    if (x < p1 - l1 / 2)
      ans += 2;
    else if (x == p1 - l1 / 2)
      ans += 1;
  }
  printf("%d\n", ans);
}
