IntermediateRating 1400
Split Into Small and Big
Split the list at the earliest point so that every number in the left part is ≤ every number in the right part (both parts non-empty). Print the length of the left part. Such a split always exists.
Input
n, then n integers.
Output
One integer.
Sample 1
Input
5 5 0 3 8 6
Output
3
Sample 2
Input
6 1 1 1 0 6 12
Output
4
Output appears here