Олимпиадный тренинг

Задача 42274. ocean view


Mountains stretch from east to west, and the ocean to the west. There is a hotel on top of every mountain. You want to choose which hotel to stay at. The height of the ith mountain from the west is Hi. You can of course see the ocean from the hotel, which is located on top of the westernmost mountain. For a hotel on top of the ith mountain from the west (i = 2, 3, ..., N) you will be able to see the ocean if and only if H1<=HiH2<=Hi, ... , and Hi-1<=Hi. Count from how many of these hotels you can see the ocean?

Input
The first line contains a natural number N (1 <= N <= 20) - the number of mountains. The second line contains N numbers Hi (1 <= Hi <= 100) the heights of the mountains, starting from the most western (first).


Imprint
Print the number of hotels where you can see the ocean.
 
 
Examples
# Input Output
1
4
6 5 6 8
3
2
5
4 5 3 5 4
3
3
5
9 5 6 8 4
1