#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, ans, top;
int l[200005], r[200005], q[400005];
int t[400005];
struct data {
  int l, r;
} a[200005];
bool operator<(data a, data b) {
  if (a.r == b.r) return a.l < b.l;
  return a.r < b.r;
}
map<int, int> mp;
int query(int x) {
  int mx = 0;
  for (int i = x; i; i -= i & -i) mx = max(mx, t[i]);
  return mx;
}
void update(int x, int val) {
  for (int i = x; i <= top; i += i & -i) t[i] = max(t[i], val);
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    int x = read(), y = read();
    l[i] = x - y;
    r[i] = x + y;
    q[++top] = l[i];
    q[++top] = r[i];
  }
  sort(q + 1, q + top + 1);
  for (int i = 1; i <= n; i++) {
    a[i].l = lower_bound(q + 1, q + top + 1, l[i]) - q;
    a[i].r = lower_bound(q + 1, q + top + 1, r[i]) - q;
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    int t = query(a[i].l) + 1;
    ans = max(t, ans);
    update(a[i].r, t);
  }
  printf("%d\n", ans);
  return 0;
}
