import java.util.Arrays; import java.util.Scanner; import javax.swing.JFrame; public class Main { void run() { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] pf = new int[n]; for (int i = 0; i < n; ++i) { pf[i] = sc.nextInt(); } double[] F = new double[n + 1]; double[] f = new double[n + 1]; double F_inf = (Math.sqrt((0.81) / (1 - 0.81))) / ((0.9) / (1 - 0.9)); for (int i = 1; i <= n; ++i) { double u = 0; double l = 0; for (int j = 1; j <= i; ++j) { u += Math.pow(0.81, j); l += Math.pow(0.9, j); } F[i] = Math.sqrt(u) / l; f[i] = (F[i] - F_inf) / (F[1] - F_inf) * 1200; } double u = 0, l = 0; for (int j = 1; j <= n; ++j) { u += Math.pow(2, 1d * pf[j - 1] / 800) * Math.pow(0.9, j); l += Math.pow(0.9, j); } System.out.println((int) (Math.log(u / l) / Math.log(2) * 800 - f[n])); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } public static void main(String[] args) { new Main().run(); } }