Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

VFINDTWOMAX - Second-highest Number

Given a sequence of n integers a1, a2,... an. Find the second-highest item of ai (i = 1...n).

Input

Line 1: contains the integer n (1 ≤ n ≤ 106).

Line 2 to n + 1: (i + 1)-th line contains the integer ai (|ai| ≤ 109)

Output

Only one line contains the second-highest item of ai.

Example

Input:
3
1
2
3 Output: 2

Được gửi lên bởi:Viet-Hoa Do
Ngày:2017-07-17
Thời gian chạy:1s
Giới hạn mã nguồn:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Ngôn ngữ cho phép:ASM32-GCC ASM32 ASM64 BASH C-CLANG C NCSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG C99 GO JULIA PYPY3

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.