Silver medal
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Vasiliy athlete competed in hokkeybol and got in the individual event silver medal. It is known that participants who scored the same number of points will be awarded the same awards. We also know that were raffled off with gold, silver and bronze medals. In this problem we do not ask the hokkeybol rules. You only need to determine how many points were scored by Vasiliy.
Input
The first line contains the number of athletes n (2 ≤ n ≤ 1000) participating in competitions. In the second line n integers are given - the results of competition.
Output
Print one number - the result of Vasiliy.
Examples
Input #1
Answer #1
Submissions 8K
Acceptance rate 49%