#include <bits/stdc++.h>
using namespace std;
int a[200002];
pair<int, int> b[200002];
int main() {
  int n, k, max = 0;
  for (int i = 0; i < 200001; i++) {
    a[i] = 2147483647;
  }
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &b[i].first, &b[i].second);
  }
  sort(b, b + n);
  for (int i = 0; i < n; i++) {
    int d = b[i].first - b[i].second;
    int* c = upper_bound(a, a + max, d);
    int index = c - a;
    if (index + 1 > max) {
      max = index + 1;
    }
    a[index] = min(a[index], b[i].first + b[i].second);
  }
  printf("%d\n", max);
  return 0;
}
