#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
struct cc {
  int num, bj, sum;
} p;
vector<cc> l;
bool cmp(const cc& a, const cc& b) {
  if (a.sum != b.sum)
    return a.sum < b.sum;
  else
    return a.bj < b.bj;
}
int a[200005] = {0};
int main() {
  int i, j, n, x1, x2, m = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d%d", &x1, &x2);
    p.num = i;
    p.bj = 1;
    p.sum = x1 - x2;
    l.push_back(p);
    p.bj = -1;
    p.sum = x1 + x2;
    l.push_back(p);
  }
  sort(l.begin(), l.end(), cmp);
  for (i = 0; i < l.size(); i++) {
    if (l[i].bj == -1)
      m = max(m, a[l[i].num]);
    else
      a[l[i].num] = m + 1;
  }
  printf("%d\n", m);
  return 0;
}
