#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>
#include <random>
#include <limits>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define RREP(i,m,n) for(int i=int(n)-1;i>=int(m);--i)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())
//#define int long long

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR 
#endif
using namespace std;

using UI = unsigned int;
using UL = unsigned long;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VVLL = vector<VLL>;
using VS = vector<string>;
using PII = pair<int,int>;
using VP = vector<PII>;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }


template<typename T = long long>
class SegmentTree {
public:
    std::vector<T> ary;
    int n;
    const T default_value = 0;
    SegmentTree(int n) {
        this->n = 1;
        while (this->n < n) this->n *= 2;
        ary.resize(this->n * 2 - 1, 0);
    }
    T ope(T l, T r) {
        return std::max(l, r);
    }
    void update(int k, T d) {
        k += n - 1;
        //ary[k] += d;
        ary[k] = max(ary[k], d);
        while (k > 0) {
            k = (k - 1) / 2;
            ary[k] = ope(ary[2 * k + 1], ary[2 * k + 2]);
        }
    }
    T query(int a, int b) {
        return query(a, b, 0, n, 0);
    }
    T query(int a, int b, int l, int r, int i) {
        if (a <= l && b >= r) return ary[i];
        //if (a >= r || b <= l) return 0; // sum
        if (a >= r || b <= l) return default_value; // min
        int m = (l + r) / 2;
        T vl = query(a, b, l, m, 2 * i + 1);
        T vr = query(a, b, m, r, 2 * i + 2);
        return ope(vl, vr);
    }
};

struct S {
    int x,l;
    int add() {return x + l;}
    int sub() {return x - l;}
};

void solve() {
    int n;
    cin >> n;
    VLL x(n), l(n);
    vector<S> ss(n);
    set<int> s;
    REP(i,0,n) cin >> ss[i].x >> ss[i].l;
    sort(all(ss), [](auto &l, auto &r) {
        return l.x < r.x;
    });
    REP(i,0,n) s.insert(ss[i].add());
    REP(i,0,n) s.insert(ss[i].sub());
    //*
    VI za;
    for (auto &v: s) za.push_back(v);
    map<int,int> zar;
    REP(i,0,za.size()) zar[za[i]] = i;

    VI dp(n,1);
    SegmentTree<> st(za.size() + 1);
    st.update(zar[ss[0].add()], 1);
    REP(i,1,n) {
        LL cnt = st.query(0,zar[ss[i].sub()] + 1);
        dp[i] = cnt + 1;
        st.update(zar[ss[i].add()], dp[i]);
        dump(dp[i]);
    }
    cout << *max_element(all(dp)) << endl;
    //*/
}

signed main() {
    solve();
    
    return 0;
}

Measured memory_bytes: 26616