Given an array A of N elements.
Strength of a single element Ai is calculated as:
Strengthi = Q*Ai where Q is equal to the minimum element in the range 1 to i (both inclusive).
Print Maximum Strength among all the array elements.
INPUT:
First line contains an integer N.
Next line contains N space separated integers.
OUTPUT:
Print the maximum Strength.
Constraints:
1 <= N <= 105.
1 <= Ai <= 109.