#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 10;
vector<int> ax;
vector<int> upd[MAXN];
int mpX(int x) { return lower_bound(ax.begin(), ax.end(), x) - ax.begin(); }
int dp[MAXN], x[MAXN], w[MAXN];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> w[i];
    ax.push_back(x[i] + w[i]);
    ax.push_back(x[i] - w[i]);
  }
  sort(ax.begin(), ax.end());
  ax.erase(unique(ax.begin(), ax.end()), ax.end());
  for (int i = 0; i < n; i++) upd[mpX(x[i] + w[i])].push_back(i);
  for (int i = 0; i < ax.size(); i++) {
    dp[i] = i == 0 ? 0 : dp[i - 1];
    for (int j = 0; j < upd[i].size(); j++) {
      int u = upd[i][j];
      dp[i] = max(dp[i], dp[mpX(x[u] - w[u])] + 1);
    }
  }
  cout << dp[ax.size() - 1] << endl;
  return 0;
}
