#include <bits/stdc++.h>
using namespace std;
long long n;
long long dp[200005];
long long seg[800005];
map<long long, long long> M;
long long cnt;
pair<long long, pair<long long, long long> > arr[200005];
void upd(long long node, long long st, long long en, long long idx,
         long long val) {
  if (idx < 1 || idx > n || st > en || idx > en || idx < st) return;
  if (st == en) {
    seg[node] = val;
    return;
  }
  long long mi = (st + en) >> 1LL;
  upd(2 * node, st, mi, idx, val);
  upd(2 * node + 1, mi + 1, en, idx, val);
  seg[node] = max(seg[2 * node], seg[2 * node + 1]);
}
long long q(long long node, long long st, long long en, long long qst,
            long long qen) {
  if (qst > qen || st > en || qst > en || qen < st) return 0;
  if (qst <= st && qen >= en) return seg[node];
  return max(q(2 * node, st, (st + en) >> 1LL, qst, qen),
             q(2 * node + 1, ((st + en) >> 1LL) + 1, en, qst, qen));
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i].second.first;
    cin >> arr[i].second.second;
    arr[i].first = arr[i].second.first + arr[i].second.second;
  }
  sort(arr + 1, arr + n + 1);
  vector<long long> V;
  for (int i = 1; i <= n; ++i) {
    if (M[arr[i].first] == 0) {
      M[arr[i].first] = ++cnt;
    }
    V.push_back(arr[i].first);
  }
  for (int i = 1; i <= n; ++i) {
    upd(1, 1, n, i, 1);
    dp[i] = 1;
  }
  for (int i = 1; i <= n; ++i) {
    if (arr[i].second.first - arr[i].second.second <= 0) continue;
    long long val = arr[i].second.first - arr[i].second.second;
    long long idx =
        (long long)(upper_bound(V.begin(), V.end(), val) - V.begin());
    dp[i] = max(dp[i], q(1, 1, n, 1, idx) + 1);
    upd(1, 1, n, i, dp[i]);
  }
  cout << q(1, 1, n, 1, n) << endl;
  return 0;
}
