#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
struct viet {
  long long x, w;
};
viet a[N];
bool cmp(viet x, viet y) { return (x.x - x.w) < (y.x - y.w); }
long long dp[N];
set<pair<long long, long long>> s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].x >> a[i].w;
  }
  sort(a + 1, a + n + 1, cmp);
  dp[n + 1] = 0;
  s.insert({1000000000000, n + 1});
  for (int i = n; i >= 1; i--) {
    dp[i] = max(dp[i], dp[i + 1]);
    auto it = s.lower_bound({a[i].w + a[i].x, -1e18});
    dp[i] = max(dp[i], dp[(*it).second] + 1);
    s.insert({a[i].x - a[i].w, i});
  }
  cout << dp[1];
}
