#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int n;cin>>n;
vector<vector<ll>> a(n, vector<ll>(3));
for(int i = 0;i<n;i++){
a[i][1] = i;
ll l,r;cin>>l>>r;
if(i-l<0){
a[i][2] = 0;
}
else a[i][2] = i-l;
if(i+r>n-1){
a[i][0] = n-1;
}
else a[i][0] = i+r;
}
sort(a.begin(),a.end());
vector<vector<ll>> b;
b.push_back({a[0][0],a[0][1],a[0][2]});
int rn = 0;
int ans = 1;
for(int i = 1;i<n;i++){
if(a[i][1]<=b[rn][0]){
continue;
}
else if(a[i][2]<=b[rn][1]){
continue;
}
else{
b.clear();
b.push_back({a[i][0],a[i][1],a[i][2]});
ans++;
}
}
cout<<ans<<endl;
}