#include <bits/stdc++.h>
using namespace std;
const long long size = 200007;
const long long modulo = (1LL << 31) - 1;
const long long oo = 1e11;
const double EPS = 1e-11;
const double PI = acos(-1.0);
int fen[size];
int maxi(int n) {
  int res = 0;
  for (; n >= 0; n = (n & (n + 1)) - 1) res = max(res, fen[n]);
  return res;
}
void add(int n, int val) {
  for (; n < size; n |= (n + 1)) fen[n] = max(fen[n], val);
}
int binar(vector<int>& s, int n, int val) {
  int l = -1, r = n - 1;
  while (l < r) {
    int mid = (l + r + 1) / 2;
    if (mid < 0) break;
    if (s[mid] > val)
      r = mid - 1;
    else
      l = mid;
  }
  return l;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<pair<int, int> > a(n);
  map<int, int> sums;
  vector<int> sum;
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &a[i].first, &a[i].second);
    sums[a[i].first + a[i].second] = 0;
  }
  sort(sum.begin(), sum.end());
  int k = 0;
  for (auto it = sums.begin(); it != sums.end(); it++, k++)
    it->second = k, sum.push_back(it->first);
  sort(a.begin(), a.end());
  int ans = 1;
  for (int i = 0; i < n; i++) {
    if (a[i].first - a[i].second > 0) {
      int ind = binar(sum, sum.size(), a[i].first - a[i].second);
      int cur = 1 + maxi(ind);
      ans = max(ans, cur);
      int ind2 = sums[a[i].first + a[i].second];
      add(ind2, cur);
    } else {
      int ind2 = sums[a[i].first + a[i].second];
      add(ind2, 1);
    }
  }
  cout << ans << endl;
  return 0;
}
