#include <bits/stdc++.h>
using namespace std;
struct node {
  double node;
  double length;
} a[1100];
bool cmp(node a, node b) { return a.node < b.node; }
int main() {
  int m, sum;
  double n;
  while (scanf("%d%lf", &m, &n) != EOF) {
    sum = 2;
    memset(a, 0, sizeof(a));
    int i;
    double length = 0, left, right;
    for (i = 0; i < m; i++) scanf("%lf%lf", &a[i].node, &a[i].length);
    sort(a, a + m, cmp);
    for (i = 0; i < m - 1; i++) {
      left = a[i].node + a[i].length / 2;
      right = a[i + 1].node - a[i + 1].length / 2;
      length = right - left;
      if (length > n)
        sum += 2;
      else if (length == n)
        sum += 1;
    }
    printf("%d\n", sum);
  }
  return 0;
}
