#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  pair<long long, long long> itv[n];
  for (int i = 0; i < n; i++) {
    int d, e;
    cin >> d >> e;
    itv[i].first = d + e - 1;
    itv[i].second = d - e + 1;
  }
  sort(itv, itv + n);
  int ans1 = 0;
  long long t1 = -2000000001;
  for (int i = 0; i < n; i++) {
    if (t1 < itv[i].second) {
      ans1++;
      t1 = itv[i].first;
    }
  }
  for (int i = 0; i < n; i++) {
    int q = 0;
    q = itv[i].second;
    itv[i].second = itv[i].first;
    itv[i].first = q;
  }
  sort(itv, itv + n);
  int ans2 = 0;
  long long t2 = -2000000001;
  for (int i = 0; i < n; i++) {
    if (t2 < itv[i].second) {
      ans2++;
      t2 = itv[i].first;
    }
  }
  cout << min(ans1, ans2) << endl;
}
