#include <bits/stdc++.h>
using namespace std;
pair<int, int> node[200000];
bool cmp(const pair<int, int> &a, const pair<int, int> &b) {
  return a.first + a.second < b.first + b.second;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> node[i].first >> node[i].second;
  sort(node, node + n, cmp);
  int ans = 0;
  int idx = 0, res = 0;
  int current = INT_MIN;
  while (idx != n) {
    if (node[idx].first - node[idx].second < current) {
      idx++;
      continue;
    }
    res++;
    current = node[idx].first + node[idx].second;
    idx++;
  }
  cout << res << endl;
  return 0;
}
