M as a prisoner loves playing with his array a1,a2,...,an, he can do following operation as much as he wants:
M thinks beautifulness of an array is maximum value of it (max(a1,a2,...,an)).
What is the maximum value of beautifulness that M can get after doing above operation as much as he wants?
Input
First line contains only n, length of array.
Second line contains the array elements a1,a2,...,anseparated by space.
2≤n≤2×105
1≤ai≤109
Output
The only line of output contains an integer, maximum beautifulness value that M can get.
M can do the operation on i=1,j=2 then on i=2,j=3 then on i=5,j=4 and then on i=4,j=3.
After operations array becomes 1,1,6,1,1.