#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
const double EPS = 1e-6;
const int INF = 0x3fffffff;
const long long LINF = INF * 1ll * INF;
const double PI = acos(-1.0);
using namespace std;
pair<int, int> p[200005];
int dp[200005];
long long x[200005];
int sum[200005];
int cnt = 0;
void add(int u, int val) {
  for (int i = u; i <= cnt; i += (i & (-i))) sum[i] = max(sum[i], val);
}
int query(int u) {
  int ans = 0;
  for (int i = u; i; i -= (i & (-i))) ans = max(ans, sum[i]);
  return ans;
}
int main(void) {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d %d", &p[i].first, &p[i].second);
  sort(p, p + n);
  for (int i = 0; i < n; i++) x[cnt++] = 0ll + p[i].first + p[i].second;
  sort(x, x + cnt);
  cnt = unique(x, x + cnt) - x;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    long long val = p[i].first - p[i].second;
    int pos = upper_bound(x, x + cnt, val) - x;
    pos--;
    dp[i] = query(pos + 1) + 1;
    pos = lower_bound(x, x + cnt, 0ll + p[i].first + p[i].second) - x;
    add(pos + 1, dp[i]);
    ans = max(ans, dp[i]);
  }
  printf("%d\n", ans);
  return 0;
}
