#include <bits/stdc++.h>
using namespace std;
int n, dp[200001], ans;
vector<pair<int, int> > a;
map<int, int> mp;
int main() {
  scanf("%d", &n);
  for (int i = 0, x, w; i < n; i++)
    scanf("%d%d", &x, &w), a.push_back({x + w, x - w});
  sort(a.begin(), a.end());
  for (auto it = a.begin(); it != a.end(); it++) {
    int hi = it->first, lo = it->second;
    auto itt = lower_bound(a.rbegin(), a.rend(), make_pair(lo, INT_MAX),
                           greater<pair<int, int> >());
    dp[it - a.begin()] =
        max(((a.rend() - itt - 1 < 0) ? 0 : dp[a.rend() - itt - 1]) + 1,
            ((it == a.begin()) ? 0 : dp[it - a.begin() - 1]));
    ans = max(dp[it - a.begin()], ans);
  }
  printf("%d", ans);
}
