#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
pair<int, int> p[400010];
int n;
int b[400010], ss[400010], sub[400010], first[400010], w[400010], a[400010];
void add(int u, int val) {
  for (; u <= 2 * n; u += u & -u) smax(b[u], val);
}
int sum(int u) {
  int first = 0;
  for (; u; u -= u & -u) smax(first, b[u]);
  return first;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &first[i], &w[i]);
  for (int i = 1; i <= n; i++) {
    p[i].first = first[i];
    p[i].second = w[i];
  }
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++) {
    first[i] = p[i].first;
    w[i] = p[i].second;
  }
  int k = 0;
  for (int i = 1; i <= n; i++) a[++k] = first[i] + w[i];
  for (int i = 1; i <= n; i++) a[++k] = first[i] - w[i];
  sort(a + 1, a + k + 1);
  int cnt = unique(a + 1, a + k + 1) - a;
  for (int i = 1; i <= n; i++) {
    ss[i] = lower_bound(a + 1, a + k + 1, first[i] + w[i]) - a;
    sub[i] = lower_bound(a + 1, a + k + 1, first[i] - w[i]) - a;
  }
  int res = 0;
  for (int i = 1; i <= n; i++) {
    int ans = sum(sub[i]) + 1;
    add(ss[i], ans);
    smax(res, ans);
  }
  printf("%d\n", res);
  return 0;
}
