#include <bits/stdc++.h>
using namespace std;
struct __io_dev {
  __io_dev(const bool& __fastio = false) {
    if (__fastio) ios_base::sync_with_stdio(false), cin.tie(nullptr);
    srand(time(nullptr));
    if (!string("").empty())
      freopen(
          ""
          ".in",
          "r", stdin),
          freopen(
              ""
              ".out",
              "w", stdout);
  }
  ~__io_dev() { fprintf(stderr, "%.6f ms\n", 1e3 * clock() / CLOCKS_PER_SEC); }
} __io(false);
const long long inf = (long long)1e+9 + 7ll;
const long double eps = (long double)1e-9;
const long double pi = acosl((long double)-1.0);
const int alph = 26;
const int sqr = 3017;
static char buff[(int)2e6 + 17];
long long __p[3] = {29ll, 31ll, 33ll};
long long __mod[3] = {inf, inf + 2ll, 14881337ll};
const int maxn = (int)2e5 + 17;
struct tree {
  tree *lf, *rg;
  int x;
  tree() : lf(nullptr), rg(nullptr), x(0) {}
};
typedef tree* T;
int n, ans;
pair<long long, long long> lr[maxn];
T root = new tree();
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.second != b.second)
    return a.second < b.second;
  else
    return a.first < b.first;
}
void cr(T& v) {
  if (v == nullptr) v = new tree();
}
void update(long long i, long long k, T& v = root, long long l = 0,
            long long r = 3ll * inf) {
  if (l == r)
    v->x = k;
  else {
    long long m = (l + r) / 2;
    if (i <= m)
      cr(v->lf), update(i, k, v->lf, l, m);
    else
      cr(v->rg), update(i, k, v->rg, m + 1, r);
    v->x = max(v->x, max((v->lf == nullptr ? 0 : v->lf->x),
                         (v->rg == nullptr ? 0 : v->rg->x)));
  }
}
long long getmax(long long lf, long long rg, T& v = root, long long l = 0,
                 long long r = 3ll * inf) {
  if (l == lf && r == rg) return v->x;
  long long m = (l + r) / 2, res = 0;
  if (lf <= min(m, rg))
    cr(v->lf), res = max(res, getmax(lf, min(m, rg), v->lf, l, m));
  if (max(lf, m + 1) <= rg)
    cr(v->rg), res = max(res, getmax(max(lf, m + 1), rg, v->rg, m + 1, r));
  return res;
}
int main() {
  scanf("%d", &n);
  for (long long i = 0ll; i < (long long)n; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    lr[i] = {inf + a - b, inf + a + b};
  }
  sort(lr, lr + n, cmp);
  for (long long i = 0ll; i < (long long)n; ++i)
    update(lr[i].second, getmax(0, lr[i].first) + 1);
  printf("%d\n", getmax(0, 3ll * inf));
  return 0;
}
