Category
Similar Problems
0725. Silver medal
Time limit : 1000 ms
Memory limit : 64 mb
Vasiliy athlete competed in hokkeybolu 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 the problem is not asked hokkeybola rules. You only need to determine how many points are scored 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. The numbers are in range from 1 to 109.
Output
Print one number - the result of Vasiliy.
Samples
№ |
Input |
Output |
1 |
5 4 3 3 1 2 |
3 |
2 |
8 1 2 5 3 5 6 6 5 |
5 |
Text from: e-olimp.com