Sabotage

No attempts yetTime limit1sMemory limit128 MB

Problem

Farmer Paul's plan is to disconnect a contiguous block of milking machines, but not the first or the last one.

There are NN machines in a row. Machine ii produces MiM_i units of milk (3N1000003 \le N \le 100\,000, 1Mi100001 \le M_i \le 10\,000). Paul may remove machines ii through jj with 2ijN12 \le i \le j \le N-1. He must remove at least one machine. After removal, what is the minimum possible average production of the machines that remain?

Farmer John wants that minimum average if Paul's plot succeeds.

Input

Line 1 contains the integer NN.

The next NN lines each contain MiM_i for machine ii.

Output

Print the minimum achievable average, rounded to three digits after the decimal point, with exactly three digits after the decimal point.