#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<pair<int, int> > x(n);
  for (pair<int, int> &a : x) cin >> a.first >> a.second;
  sort((x).begin(), (x).end(),
       [](const pair<int, int> &a, const pair<int, int> &b) {
         return a.first + a.second < b.first + b.second;
       });
  int cnt = 0;
  int mx = -2e9;
  for (pair<int, int> a : x) {
    if (a.first - a.second >= mx) {
      mx = a.first + a.second;
      ++cnt;
    }
  }
  cout << cnt << endl;
  return 0;
}
