#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<pair<int, int>> vec(N);
  for (int i = 0; i < N; i++) {
    int a, b;
    cin >> a >> b;
    vec[i] = {a - b, a + b};
  }
  sort(vec.begin(), vec.end(),
       [](pair<int, int> a, pair<int, int> b) { return a.second < b.second; });
  int res = 0;
  int cur = -1e9;
  for (int i = 0; i < N; i++) {
    if (vec[i].first < cur) continue;
    res++;
    cur = vec[i].second;
  }
  cout << res << endl;
}
