#include using namespace std; int N; int RPerf[100]; double g(double x) { return pow(2, x / 800); } double inv_g(double x) { return 800 * log2(x); } double F(int n) { if (n == int(5e6)) return sqrt(0.81 / 0.19) / (0.9 / 0.1); double u = 0, v = 0; for (int i = 0; i < n; ++i) { u += pow(0.81, i + 1); v += pow(0.9, i + 1); } return sqrt(u) / v; } double f(int n) { return (F(n) - F(int(5e6))) / (F(1) - F(int(5e6))) * 1200; } double r(int n) { double u = 0, v = 0; for (int i = 0; i < n; ++i) { u += g(RPerf[i]) * pow(0.9, i + 1); v += pow(0.9, i + 1); } return inv_g(u / v) - f(n); } int main() { cin >> N; for (int i = 0; i < N; ++i) { cin >> RPerf[i]; } cout << ceil(r(N) + 0.5) << endl; return 0; }