← Problem book: C Lesson 59 of 96 · 10 XP

Position of the last minimum

Theory and problem statement

Machine translation, not yet reviewed by a native speaker.

The first line contains the count of numbers n (n ≥ 1), the second — the n integers themselves, separated by spaces.

Print the position of the smallest number (numbering from 1). If there are several minimums, print the position of the last one.

Example

Input:

5
3 1 2 1 5

Output:

4

Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.