100 atcoder#ABC124B. [ABC124B] Great Ocean View
[ABC124B] Great Ocean View
Score : points
Problem Statement
There are mountains ranging from east to west, and an ocean to the west.
At the top of each mountain, there is an inn. You have decided to choose where to stay from these inns.
The height of the -th mountain from the west is .
You can certainly see the ocean from the inn at the top of the westmost mountain.
For the inn at the top of the -th mountain from the west , you can see the ocean if and only if , , , and .
From how many of these inns can you see the ocean?
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of inns from which you can see the ocean.
4
6 5 6 8
3
You can see the ocean from the first, third and fourth inns from the west.
5
4 5 3 5 4
3
5
9 5 6 8 4
1