#include <bits/stdc++.h>
using namespace std;
const int N = 200001;
char c;
inline void in(int &x) {
  x = 0;
  c = getchar();
  while (c < 48 || c > 57) c = getchar();
  while (c >= 48 && c <= 57) {
    x = x * 10 + c - 48;
    c = getchar();
  }
}
struct Point {
  int x, w, d;
  bool operator<(const Point &A) const { return d < A.d; }
} p[N];
int n, dp[N], b[N];
int s[N << 2], l[N << 2], r[N << 2];
void build(int o, int ll, int rr) {
  s[o] = 0;
  l[o] = ll;
  r[o] = rr;
  if (ll < rr) {
    int m = ll + rr >> 1;
    build(o << 1, ll, m);
    build((o << 1) | 1, m + 1, rr);
  }
}
void maintain(int o) { s[o] = max(s[o << 1], s[(o << 1) | 1]); }
int query(int o, int ll, int rr) {
  if (l[o] == ll && r[o] == rr) return s[o];
  int m = l[o] + r[o] >> 1;
  if (rr <= m)
    return query(o << 1, ll, rr);
  else if (ll > m)
    return query((o << 1) | 1, ll, rr);
  else
    return max(query(o << 1, ll, m), query((o << 1) | 1, m + 1, rr));
}
void update(int o, int pp, int v) {
  if (l[o] == pp && r[o] == pp)
    s[o] = v;
  else {
    int m = l[o] + r[o] >> 1;
    if (pp <= m)
      update(o << 1, pp, v);
    else
      update((o << 1) | 1, pp, v);
    maintain(o);
  }
}
int main() {
  in(n);
  for (int i = 0; i < n; i++) {
    in(p[i].x);
    in(p[i].w);
    p[i].d = p[i].x - p[i].w;
    b[i] = p[i].x + p[i].w;
  }
  sort(b, b + n);
  int m = unique(b, b + n) - b;
  build(1, 1, m);
  sort(p, p + n);
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int j = upper_bound(b, b + m, p[i].d) - b;
    int v = 1;
    if (j) v += query(1, 1, j);
    ans = max(ans, v);
    j = lower_bound(b, b + m, p[i].x + p[i].w) - b + 1;
    update(1, j, v);
  }
  printf("%d\n", ans);
  return 0;
}
