Fire Lord Ozai, who is also known for being a Joker (tell me if you get this reference!), finds the number extremely funny. He has lined up of his citizens with the intention of recruiting some of them for his army. When looking at a certain soldier, Ozai will consider him ugly if he and his adjacent soldiers in line are all less than or equal to a height of . Ozai needs to figure out just how ugly his potential recruits are. Help Ozai count the number of ugly soldiers in line.
Input Specification
The first line will contain the number of soldiers, .
The next lines will contain the heights of all the soldiers in the order they are standing in line.
Output Specification
Print the number of ugly soldiers in line.
Sample Input
3
30
25
50
Sample Output
1
Explanation for Sample Output
Only the first soldier is ugly.
Comments
This comment is hidden due to too much negative feedback. Show it anyway.
I feel like that wouldn't be right, to check circularly. If so then the solider at 30 would be adjacent to 50(>41), not making it ugly and 25 is already not ugly meaning their are no ugly soldiers
do you mean that the first person's adjacent soldiers are #2 and last person in line?