#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  scanf("%d", &n);
  vector<pair<int, int> > G;
  for (i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    G.push_back(pair<int, int>(x + y, x - y));
  }
  sort(G.begin(), G.end());
  int lower = -2e9, ans = 0;
  for (i = 0; i < n; i++) {
    if (G[i].second >= lower) {
      lower = G[i].first;
      ans++;
    }
  }
  printf("%d\n", ans);
  return 0;
}
