#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (b.second > a.second) return true;
  if (b.second < a.second) return false;
  if (b.first > a.first) return true;
  return false;
}
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > t(n);
  for (int i = 0; i < n; i++) {
    cin >> t[i].first >> t[i].second;
    int tmp = t[i].second;
    t[i].second += t[i].first;
    t[i].first -= tmp;
  }
  sort(t.begin(), t.end(), cmp);
  int pred = t[0].second;
  cout << endl;
  int res = 1;
  for (int i = 1; i < n; i++)
    if (t[i].first >= pred) {
      pred = t[i].second;
      res++;
    }
  cout << res;
  int vvv;
  cin >> vvv;
}
