#include <bits/stdc++.h>
using namespace std;
int n, x[200005], w[200005], q[200005], b[200005], c[200005], m;
bool cmp(int a, int b) { return x[a] < x[b]; }
void insert(int x, int y) {
  for (int i = x; i <= m; i += i & -i) b[i] = max(b[i], y);
}
int query(int x) {
  int ret = 0;
  for (int i = x; i; i ^= i & -i) ret = max(ret, b[i]);
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = (0); i < (n); i++) {
    scanf("%d %d", &x[i], &w[i]);
    c[i] = x[i] + w[i];
    q[i] = i;
  }
  sort(c, c + n);
  m = unique(c, c + n) - c;
  sort(q, q + n, cmp);
  for (int i = (0); i < (n); i++) {
    int j = q[i];
    int ind = upper_bound(c, c + m, x[j] - w[j]) - c - 1;
    int v = query(ind + 1) + 1;
    ind = lower_bound(c, c + m, x[j] + w[j]) - c;
    insert(ind + 1, v);
  }
  printf("%d\n", query(m));
  scanf("\n");
}
