#SDNU1172. Queue

Queue

Description

On the PE,the teacher wants to choose some of nn students to play games. Teacher asks nn students stand in a line randomly(obviously,they have different height), then teacher tells someone to leave the queue(relative position is not change)to make the left students keep a special queue:
Assuming that the left students’ numbers are 1,2,1, 2, …… ,m, m from left to right and their height are T1,T2,,TmT1,T2,……,Tm . Then they satisfy T1<T2<......<Ti,Ti>Ti+1>>Tm(1<=i<=m).T1<T2<......<Ti, Ti>Ti+1>……>Tm (1<=i<=m).
Giving you the height of nn students (from left to right), please calculate how many students left at most if you want to keep such a special queue.

Format

Input

The first line contains an integer n(2<=n<=1000)n (2<=n<=1000) represents the number of students.
The second line contains nn integers Ti(150<=Ti<=200)Ti(150<=Ti<=200) separated by spaces, represent the height(cm) of student ii .

Output

One integer represents the number of the left students.

Samples


8  
186 180 150 183 199 130 190 180  

5