Find the Peak
The array strictly increases up to a single peak and then strictly decreases (either part may be empty). Print the index of the peak in .
Input
, then integers.
Output
The 0-based index of the peak.
Constraints
Sample 1
Input
6 1 3 8 12 4 2
Output
3
Sample 2
Input
3 10 5 1
Output
0