Silver Medal#245

Silver Medal

1 second
128 megabytes
Easy (≈1000)

Ahmed participated in the computer science subject competition and won a silver medal. It is known that participants who score the same points are awarded the same medal. It is also known that gold, silver, and bronze medals have been awarded. It is necessary to determine how many points Ahmed scored.

Input

The first line contains the number of participants (2 ≤ n ≤ 1000) in the competition, and the second line contains the space-separated results of participants.

Output

Output Ahmed's result.

Examples

Example 1

Loading
Loading