#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
pair<int, int> cd[222222];
int n, m;
int val[444444] = {0};
int mm[444444] = {0};
int dp[222222] = {0};
void update(int x, int k) {
  while (x <= m) mm[x] = max(mm[x], k), x += x & -x;
}
int findsum(int x) {
  int result = 0;
  while (x) result = max(result, mm[x]), x -= x & -x;
  return result;
}
int main() {
  int ppp = 0;
  ppp++;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%d%d", &cd[i].first, &cd[i].second),
        val[2 * i - 1] = cd[i].first + cd[i].second,
                    val[2 * i] = cd[i].first - cd[i].second;
  sort(val + 1, val + 2 * n + 1);
  m = unique(val + 1, val + 2 * n + 1) - val - 1;
  sort(cd + 1, cd + n + 1);
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    int x = lower_bound(val + 1, val + m + 1, cd[i].first - cd[i].second) - val;
    ans = max(ans, findsum(x) + 1);
    update(lower_bound(val + 1, val + m + 1, cd[i].first + cd[i].second) - val,
           findsum(x) + 1);
  }
  printf("%d\n", ans);
  return 0;
}
