#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, pos, weight;
  cin >> n;
  vector<pair<int, int>> vertex;
  vector<int> dp(n);
  vertex.reserve(n);
  for (int i = 0; i < n; i++) {
    cin >> pos >> weight;
    vertex.push_back(make_pair(pos + weight, pos - weight));
  }
  sort(vertex.begin(), vertex.end());
  for (int i = 0; i < n; i++) {
    int previous = upper_bound(vertex.begin(), vertex.begin() + i,
                               make_pair(vertex[i].second, INT_MAX)) -
                   vertex.begin() - 1;
    if (previous == -1) {
      dp[i] = 1;
    } else {
      dp[i] = dp[previous] + 1;
    }
    if (i > 0) dp[i] = max(dp[i], dp[i - 1]);
  }
  cout << *max_element(dp.begin(), dp.end()) << endl;
  return 0;
}
