unittest
{
	assert( [ "4", "6 5 6 8" ].parse.expand.solve == 3 );
	assert( [ "5", "4 5 3 5 4" ].parse.expand.solve == 3 );
	assert( [ "5", "9 5 6 8 4" ].parse.expand.solve == 1 );
}



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 );
	input.popFront;
	auto hs = input.front.split.to!( long[] );
	return tuple( hs );
}

auto solve( long[] hs )
{
	auto ans = 0L;
	auto m = 0L;
	foreach( h; hs )
	{
		if( m <= h )
		{
			ans++;
			m = h;
		}
	}
	return ans;
}
