from math import sqrt, log2 def F(n): a, b = 0, 0 for i in range(1, n + 1): a += pow(0.9, i) b += pow(0.81, i) return sqrt(b)/a def f(n): return (F(n) - F(1000))/(F(1) - F(1000)) * 1200 def g(X): return pow(2, X/800) N = int(input()) R = [0] * N for i in range(N): R[i] = int(input()) a, b = 0, 0 for i in range(1, N + 1): a += g(R[i-1]) * pow(0.9, i) b += pow(0.9, i) print(int(800*log2(a/b) - f(N)))