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

void main ()
{
	int n;
	while (readf (" %s", &n) > 0)
	{
		readln;
		auto h = readln.splitter.map !(to !(int)).array;
		int res = 0;
		foreach (i; 0..n)
		{
			res += h[0..i].all !(c => c <= h[i]);
		}
		writeln (res);
	}
}
