#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e5 + 10;
struct node {
  long long x, y;
  bool operator<(const node& n) const { return x < n.x; }
} NODE[maxn];
long long Max[maxn << 2], pos[maxn], idx;
long long query(int l, int r, int L, int R, int idx) {
  if (l == L && r == R) return Max[idx];
  int m = (l + r) >> 1;
  if (R <= m)
    return query(l, m, L, R, idx << 1);
  else if (L > m)
    return query(m + 1, r, L, R, idx << 1 | 1);
  else
    return max(query(l, m, L, m, idx << 1),
               query(m + 1, r, m + 1, R, idx << 1 | 1));
}
void Updata(int l, int r, int pos, long long val, int idx) {
  if (l == r) {
    Max[idx] = max(Max[idx], val);
    return;
  }
  int m = (l + r) >> 1;
  if (pos <= m)
    Updata(l, m, pos, val, idx << 1);
  else
    Updata(m + 1, r, pos, val, idx << 1 | 1);
  Max[idx] = max(Max[idx << 1], Max[idx << 1 | 1]);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld", &NODE[i].x, &NODE[i].y);
    pos[++idx] = NODE[i].x - NODE[i].y;
    pos[++idx] = NODE[i].x + NODE[i].y;
  }
  sort(NODE + 1, NODE + n + 1);
  sort(pos + 1, pos + idx + 1);
  idx = unique(pos + 1, pos + idx + 1) - pos - 1;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    int id = lower_bound(pos + 1, pos + idx + 1, NODE[i].x - NODE[i].y) - pos;
    long long Max = query(1, idx, 1, id, 1);
    ans = max(ans, Max + 1);
    id = lower_bound(pos + 1, pos + idx + 1, NODE[i].x + NODE[i].y) - pos;
    Updata(1, idx, id, Max + 1, 1);
  }
  printf("%lld\n", ans);
  return 0;
}
