#include <bits/stdc++.h>
using namespace std;
int n, ans = -2000000001, sum;
struct node {
  int x, y, z, q;
} a[200005];
bool cmp(node tmpx, node tmpy) {
  return ((tmpx.z != tmpy.z) ? (tmpx.z < tmpy.z) : (tmpx.q < tmpy.q));
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].x >> a[i].y;
    a[i].z = a[i].x + a[i].y;
    a[i].q = a[i].x - a[i].y;
  }
  sort(a + 1, a + 1 + n, cmp);
  for (int i = 1; i <= n; i++) {
    if (a[i].q >= ans) {
      sum++;
      ans = a[i].z;
    }
  }
  cout << sum << endl;
  return 0;
}
