#include <bits/stdc++.h>
using namespace std;
int n;
vector<pair<int, int> > v;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    v.push_back({a + b, a - b});
  }
  sort(v.begin(), v.end());
  int res = 1, ch = v[0].first;
  for (pair<int, int> p : v)
    if (p.second >= ch) res++, ch = p.first;
  cout << res;
}
