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.
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.
Print one number - the result of Vasiliy.