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
i
th 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
i
th mountain from the west (
i = 2, 3, ..., N
) you will be able to see the ocean if and only if
H1<=Hi
,
H2<=Hi sub>
,
... , 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 <= H
i <= 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
|