unittest
{
	assert( [ "4", "2 4", "4 3", "9 3", "100 5" ].parse.expand.solve == 3 );
	assert( [ "2", "8 20", "1 10" ].parse.expand.solve == 1 );
	assert( [ "5", "10 1", "2 1", "4 1", "6 1", "8 1" ].parse.expand.solve == 5 );
	
	assert( [ "3", "10 5", "11 1", "12 1" ].parse.expand.solve == 2 );		// 追加ケース
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.to!( long );
	auto xls = new long[ 2 ][ n ];
	foreach( ref ab; xls )
	{
		input.popFront;
		ab = input.front.split.to!( long[] );
	}
	return tuple( xls );
}

auto solve( long[ 2 ][] xls )
{
	// 入力を腕が動く範囲に変換
	auto lrs = new long[ 2 ][ xls.length ];
	foreach( ref lr, xl; lockstep( lrs, xls ) )
	{
		lr = [ xl[ 0 ] - xl[ 1 ] + 1, xl[ 0 ] + xl[ 1 ] - 1 ];
	}
	lrs.multiSort!( ( a, b ) => a[ 1 ] < b[ 1 ], ( a, b ) => b[ 0 ] < a[ 0 ] );
	
	// 腕が動く範囲の右端がより左にあるロボットを残す
	auto ans = 0L;
	auto p = long.min;
	foreach( lr; lrs )
	{
		if( lr[ 0 ] <= p ) continue;
		p = lr[ 1 ];
		ans++;
	}
	return ans;
}
