local msq, mlg, mfl = math.sqrt, math.log, math.floor local n = io.read("*n") local fn = (msq((1 + 0.9^n) / (1 - 0.9^n)) - 1) / (msq(19) - 1) * 1200 local denom = 9 * (1 - 0.9^n) local numer = 0 for i = 1, n do local perf = io.read("*n") numer = numer + 0.9^i * 2^(perf / 800) end local ratn = 800 * mlg(numer / denom) / mlg(2) - fn print(mfl(ratn + 0.5))