island. Statistics are presented as a series of integers representing the height of the terrain:
If the number is negative, this is a river or lake.
If the number is positive or equal to 0, this is land.
Abysses are deep, immeasurable space and can be under the water.It means a-1> a; and a <aнт.
For example, if the topography of the island is:3240346-1-1-4-30111244598712
After the analysis, the deepest abyss on the island is -4.
Your task is to find the deepest abyss on the island OLIVOH.
Input
The first line contains an integer N (1 ≤ N ≤ 100).
The second line, containing N integers ao, a1, ..., an-1 (0 ≤ i ≤N-1, -10º ≤a; ≤ 109).
Output
Please print out the deepest abyss on the island OLIVOH.
If there are no abyss, please print out the number -1.
Sample
Below is an example of how the program will run:
Sample 1
Input
15
529-30-6-2 12 8 3 18 1 52
Sample 2
Output
-6
nput
Output