#include <bits/stdc++.h>
using namespace std;
const int inf = (1 << 30) - 1;
const int mod = 1000000007;
const int N = 200005;
int n, dp[N], ans;
pair<int, int> p[N];
int root, t[30 * N], ls[30 * N], rs[30 * N], vn;
void create(int &v) {
  if (v == 0) v = ++vn;
}
void update(int &v, int l, int r, int pos, int val) {
  create(v);
  if (l == r)
    t[v] = max(t[v], val);
  else {
    if (pos <= ((l + r) >> 1))
      update(ls[v], l, ((l + r) >> 1), pos, val);
    else
      update(rs[v], ((l + r) >> 1) + 1, r, pos, val);
    t[v] = max(t[ls[v]], t[rs[v]]);
  }
}
int get(int &v, int l, int r, int L, int R) {
  if (v == 0 || r < L || R < l) return 0;
  if (L <= l && r <= R) return t[v];
  return max(get(ls[v], l, ((l + r) >> 1), L, R),
             get(rs[v], ((l + r) >> 1) + 1, r, L, R));
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d %d", &p[i].first, &p[i].second);
  sort(p + 1, p + n + 1);
  for (int i = n; i > 0; i--) {
    int L = p[i].first + p[i].second;
    int R = inf;
    int pos = p[i].first - p[i].second;
    dp[i] = get(root, 1, inf, L, R) + 1;
    if (pos > 0) update(root, 1, inf, pos, dp[i]);
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) ans = max(ans, dp[i]);
  cout << ans << endl;
  return 0;
}
