#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 10;
int N;
pair<int, int> A[MAXN];
struct fenwick {
  int data[MAXN];
  fenwick() { memset(data, 0, sizeof data); }
  void update(int pos, int val) {
    for (++pos; pos < MAXN; pos += pos & -pos) data[pos] = max(data[pos], val);
  }
  int query(int pos) {
    int ret = 0;
    for (++pos; pos > 0; pos -= pos & -pos) ret = max(data[pos], ret);
    return ret;
  }
} F;
int main(void) {
  scanf("%d", &N);
  static vector<int> COM;
  for (int i = 0; i < N; ++i) {
    scanf("%d%d", &A[i].first, &A[i].second);
    COM.push_back(A[i].first + A[i].second);
    COM.push_back(A[i].first - A[i].second);
  }
  sort(COM.begin(), COM.end());
  sort(A, A + N);
  int ans = 0;
  for (int i = 0; i < N; ++i) {
    int p1 = A[i].first - A[i].second;
    int p2 = A[i].first + A[i].second;
    int mx = F.query(lower_bound(COM.begin(), COM.end(), p1) - COM.begin());
    F.update(lower_bound(COM.begin(), COM.end(), p2) - COM.begin(), mx + 1);
    ans = max(ans, mx + 1);
  }
  printf("%d\n", ans);
  return 0;
}
