#include "bits/stdc++.h" using namespace std; typedef float numeric; numeric large_f_inf; numeric large_f(int n){ numeric num = 0; numeric den = 0; for (int i = 1; i <= n; ++i){ num += pow(0.81, (numeric)i); den += pow(0.9, (numeric)i); } return sqrt(num)/den; } numeric small_f(int n){ return 1200*(large_f(n) - large_f_inf) / (large_f(1) - large_f_inf); } numeric g(numeric x){ return pow(2.0, x/800.0); } numeric g_inv(numeric y){ return 800.0*log2(y); } numeric rating(vector& rperf){ int n = rperf.size(); numeric num = 0; numeric den = 0; for (int i = 1; i <= n; ++i){ num += g(rperf[i-1])*pow(0.9, (numeric)i); den += pow(0.9, (numeric)i); } return g_inv(num/den) - small_f(n); } void initialize(){ large_f_inf = large_f(10000); } int main(){ initialize(); int n; cin >> n; vector pf; for (int i = 0; i < n; ++i){ double p; cin >> p; pf.push_back(p); } cout << floor(rating(pf)) << endl; return 0; }