#include <bits/stdc++.h>
using namespace std;
const int SZ = 1 << 19;
struct segtree_max {
  vector<int> dat;
  void init() {
    dat.resize(SZ * 2);
    for (int i = 0; i < (SZ * 2); i++) dat[i] = 0;
  }
  void update(int pos, int x) {
    pos += SZ - 1;
    dat[pos] = x;
    while (pos > 0) {
      pos = (pos - 1) / 2;
      dat[pos] = max(dat[pos * 2 + 1], dat[pos * 2 + 2]);
    }
  }
  int get(int a, int b, int k = 0, int l = 0, int r = SZ) {
    if (b <= l || r <= a) return 0;
    if (a <= l && r <= b) return dat[k];
    return max(get(a, b, k * 2 + 1, l, (l + r) / 2),
               get(a, b, k * 2 + 2, (l + r) / 2, r));
  }
} seg;
int n;
int dp[200010];
vector<int> xs;
pair<int, int> pt[200010];
int ret;
int main() {
  cin >> n;
  for (int i = 0; i < (n); i++) {
    cin >> pt[i].first >> pt[i].second;
    xs.push_back(pt[i].first + pt[i].second);
  }
  sort(pt, pt + n);
  sort((xs).begin(), (xs).end());
  xs.erase(unique((xs).begin(), (xs).end()), xs.end());
  seg.init();
  for (int i = 0; i < (n); i++) {
    int p = upper_bound((xs).begin(), (xs).end(), pt[i].first - pt[i].second) -
            xs.begin();
    int val = seg.get(0, p);
    dp[i] = val + 1;
    seg.update(
        lower_bound((xs).begin(), (xs).end(), pt[i].first + pt[i].second) -
            xs.begin(),
        dp[i]);
    ret = max(ret, dp[i]);
  }
  cout << ret << endl;
  return 0;
}
