#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 18;
int n, s, a[N], h[N];
int x[N], w[N];
int t[N * 2 + 10];
pair<int, int> p[N];
int k, d, z = 1, dp[N];
int getT(int l, int r, int L, int R, int i) {
  if (l > R || r < L) return 0;
  if (l >= L && r <= R) return t[i];
  int m = l + r >> 1;
  return max(getT(l, m, L, R, i << 1), getT(m + 1, r, L, R, i << 1 | 1));
}
int get(int l, int r) { return getT(1, N, l, r, 1); }
void upd(int x, int v) {
  int p = lower_bound(h + 1, h + s + 1, x) - h;
  p += N - 1;
  t[p] = max(t[p], v);
  for (p >>= 1; p; p >>= 1) t[p] = max(t[p << 1], t[p << 1 | 1]);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d %d", &x[i], &w[i]);
  for (int i = 1; i <= n; i++) a[i] = x[i] + w[i], p[i] = {x[i], i};
  sort(a + 1, a + n + 1);
  h[s = 1] = a[1];
  for (int i = 2; i <= n; i++)
    if (a[i] != a[i - 1]) h[++s] = a[i];
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++) {
    k = p[i].second;
    dp[k] = 1;
    d = x[k] - w[k];
    int p = upper_bound(h + 1, h + s + 1, d) - h;
    if (!p) continue;
    dp[k] += get(1, p - 1);
    upd(x[k] + w[k], dp[k]);
  }
  for (int i = 1; i <= n; i++) z = max(z, dp[i]);
  printf("%d", z);
  return 0;
}
