Problem2339--Booby Prize

2339: Booby Prize

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Time Limit: 2 sec / Memory Limit: 1024 MB

Score : 200200 points

Problem Statement

NN players, who are numbered 1, \ldots, N1,,N, have played a game. Player ii has scored A_iAi, and a player with a smaller score ranks higher.
The player who ranks the second lowest will receive a booby prize. Who is this player? Answer with an integer representing the player.

Constraints

  • 2 \leq N \leq 2\times 10000002N2×100000
  • 1 \leq A_i \leq 10**991Ai10**9
  • A_iAi are distinct.
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:
NNA_1A1\ldotsA_NAN

Output

Print the answer.

Sample Input Copy

6
1 123 12345 12 1234 123456

Sample Output Copy

3

HINT

It is Player 33 who ranks fifth among the six players.

Source/Category