#include <bits/stdc++.h>
using namespace std;
const long long inf = 2e18 + 7;
const long long mod = 1e9 + 7;
const double eps = 1e-9;
const double PI = 2 * acos(0.0);
const double E = 2.71828;
int n;
pair<int, int> a[200005];
int main(void) {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int x, y;
    scanf("%d %d", &x, &y);
    a[i] = {x + y, x - y};
  }
  sort(a, a + n);
  int mx = -mod;
  int res = 0;
  for (int i = 0; i < n; ++i) {
    if (mx <= a[i].second) {
      mx = a[i].first;
      ++res;
    }
  }
  printf("%d\n", res);
  return 0;
}
