Competitions

# PERLA CONTEST 7 DIV2_2

# Silver medal

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.

Input example #1

5 4 3 3 1 2

Output example #1

3

Input example #2

8 1 2 5 3 5 6 6 5

Output example #2

5