#include <bits/stdc++.h>
using namespace std;
const int N = 200009;
struct node {
  int x, y;
  bool operator<(const node &other) const { return y < other.y; }
} a[N];
int n;
const int oo = (int)(2e9) + 10;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    a[i].x = x - y;
    a[i].y = x + y;
  }
  sort(a + 1, a + n + 1);
  int result = 0;
  int value = -oo;
  for (int i = 1; i <= n; i++) {
    if (a[i].x >= value) {
      result++;
      value = a[i].y;
    }
  }
  printf("%d\n", result);
}
