#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    // Tối ưu hóa I/O
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int N;
    if (!(cin >> N)) return 0;

    // Lưu trữ tọa độ đã chuyển đổi (U, V)
    vector<pair<long long, long long>> apples(N);
    for (int i = 0; i < N; ++i) {
        long long t, x;
        cin >> t >> x;
        apples[i] = {t - x, t + x};
    }

    // Sắp xếp U tăng dần, U bằng nhau thì V tăng dần
    sort(apples.begin(), apples.end());

    // Tìm độ dài Longest Strictly Decreasing Subsequence của V
    // Bằng cách tìm Longest Strictly Increasing Subsequence của -V
    vector<long long> dp;
    for (int i = 0; i < N; ++i) {
        long long v = -apples[i].second;
        
        auto it = lower_bound(dp.begin(), dp.end(), v);
        if (it == dp.end()) {
            dp.push_back(v);
        } else {
            *it = v;
        }
    }

    // Kết quả là độ dài của LDS
    cout << dp.size() << "\n";

    return 0;
}