#include <bits/stdc++.h>
#define fi first
#define se second
#define ll long long
#define N int(1e7)
using namespace std;
ll n, ans;
pair<ll, ll>vt[N+10];
bool ok[N+10];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>n;
for(int i=1; i<=n; i++) cin>>vt[i].fi>>vt[i].se;
vt[0].fi=vt[0].se=0;
if(n<=2000)
{
sort(vt+1, vt+n+1);
for(int i=1; i<=n; i++)
{
if(!ok[i])
{
for(int j=0; j<=n; j++)
{
if(i==j) continue;
if(abs(vt[i].fi-vt[j].fi)<=(vt[i].se-vt[j].se)) ok[j]=1;
}
}
}
for(int i=1; i<=n; i++) if(!ok[i]) ans++;
cout<<ans;
}
else
{
ll min1=LLONG_MAX;
ll max1=LLONG_MIN;
for(int i=1;i<=n;i++)
{
if(max1>=(vt[i].fi+vt[i].se)) ok[i]=1;
max1=max(max1,vt[i].fi+vt[i].se);
}
for(int i=n;i>=1;i--)
{
if(min1<=(vt[i].fi-vt[i].se)) ok[i]=1;
min1=min(min1,vt[i].fi-vt[i].se);
}
for(int i=1; i<=n; i++) if(!ok[i]) ans++;
cout<<ans;
}
return 0;
}