#include <bits/stdc++.h>
using namespace std;
map<int, int> dp;
pair<int, int> a[200005];
int main() {
  int n, x, w;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
    a[i].first += a[i].second;
    a[i].second *= 2;
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (i != 0 && a[i].first != a[i - 1].first) {
      dp[a[i].first] = dp[a[i - 1].first];
    }
    x = a[i].first - a[i].second;
    map<int, int>::iterator it = dp.lower_bound(x);
    if (it == dp.end()) {
      dp[a[i].first] = max(dp[a[i].first], 1);
    } else if (it->first == x) {
      dp[a[i].first] = max(dp[a[i].first], it->second + 1);
    } else if (it != dp.begin()) {
      it--;
      dp[a[i].first] = max(dp[a[i].first], it->second + 1);
    } else {
      dp[a[i].first] = max(dp[a[i].first], 1);
    }
  }
  int ans = 0;
  for (map<int, int>::iterator it = dp.begin(); it != dp.end(); it++) {
    ans = max(ans, it->second);
  }
  cout << ans;
  return 0;
}
