#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<pair<long long, long long>> v;
  for (int i = 0; i < n; ++i) {
    long long x, y;
    cin >> x >> y;
    v.push_back({x, y});
  }
  sort(v.begin(), v.end());
  set<pair<long long, long long>> s;
  vector<long long> a;
  for (auto &x : v) {
    a.push_back(x.first + x.second);
  }
  s.insert({-1, -a[0]});
  long long MAXIM = 1;
  for (int i = 1; i < n; ++i) {
    auto lb = s.lower_bound({-MAXIM, -(v[i].first - v[i].second)});
    if (lb == s.end()) {
      MAXIM = max(MAXIM, 1ll);
      s.insert({-1, -a[i]});
    } else {
      MAXIM = max(MAXIM, +1 - ((*lb).first));
      s.insert({-1 + ((*lb).first), -a[i]});
    }
  }
  cout << MAXIM << endl;
  return 0;
}
