#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
int n; cin>>n;
map<int,int> mp;
for (int i=1; i<=n; ++i) {
int x,h; cin>>x>>h;
mp[x]=max(mp[x],h);
}
int m=mp.size();
vector<int> x,h;
for (auto s : mp) x.push_back(s.first), h.push_back(s.second);
vector<bool> cov(m,false);
int mx=-2e9;
for (int i=0; i<m; ++i) {
if (h[i]+x[i]<=mx) cov[i]=true;
mx=max(mx,h[i]+x[i]);
}
mx=-2e9;
for (int i=m-1; i>=0; --i) {
if (h[i]-x[i]<=mx) cov[i]=true;
mx=max(mx,h[i]-x[i]);
}
int cnt=0;
for (auto s : cov) if (!s) ++cnt;
cout<<cnt<<"\n";
}