Drop links or images here to add them to the editor.

Second Largest ⭐⭐⭐

Read an integer N. This number indicates how many values the array will have.

Then, read N integers (one per line) and store them in an array.

Find the second largest element in the array.

Hints:

Input

An integer N, followed by N integers, one per line.

Output

The second largest element in the array.

Example

Input:

5
3
7
1
9
5

Output:

7