using System; using System.Collections.Generic; using System.Linq; public class Test { public static void Main() { var n = int.Parse(Console.ReadLine()); var list = Console.ReadLine() .Split(' ') .Select(x => int.Parse(x)) .ToList(); int ans = n; int max = 0; for(int i = 0; i < list.Count; i++) { if(max < list[i]) max = list[i]; if(list[i] >= max) ans--; } if ((ans > 0) && (list[0] == 1)) ans++; Console.WriteLine(ans); } }