#P1781. Determine the President in 6036

    ID: 15066 Type: Default 1000ms 256MiB

Determine the President in 6036

Determine the President in 6036

In Earth's year \(6036\), the entire universe is set to elect the most capable individual as its president. There are \(n\) outstanding candidates competing for the presidency and the vote counts have been tallied. Your task is to determine which candidate wins the election.

If two or more candidates receive the same maximum number of votes, the candidate with the smallest index (i.e. appearing first in the input) is declared the winner.

inputFormat

The first line contains an integer \(n\) (\(1 \leq n \leq 10^5\)), representing the number of candidates.

The second line contains \(n\) space-separated integers, where the \(i\)-th integer represents the vote count for the \(i\)-th candidate.

outputFormat

Output a single integer representing the 1-indexed number of the candidate who wins the election.

sample

3
100 200 150
2