#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 1;
const int oo = 2e9 + 1;
pair<long long, long long> a[N], V[N];
int fisrt[N], n;
int main() {
  cin >> n;
  V[0] = pair<long long, long long>(-oo, 0);
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n; i++)
    V[i] = pair<long long, long long>(a[i].first + a[i].second, i);
  sort(V, V + 1 + n);
  for (int i = 1; i <= n; i++) {
    V[i].second = max(V[i].second, V[i - 1].second);
  }
  for (int i = 1; i <= n; i++) {
    int p =
        upper_bound(V, V + 1 + n,
                    pair<long long, long long>(a[i].first - a[i].second, i)) -
        V;
    p--;
    fisrt[i] = max(fisrt[i - 1], fisrt[V[p].second] + 1);
  }
  cout << fisrt[n];
}
