#include "iostream" #include "climits" #include "list" #include "queue" #include "stack" #include "set" #include "functional" #include "algorithm" #include "string" #include "map" #include "iomanip" #include "random" using namespace std; const long long int MOD = 1000000007; const long double EPS = 0.00000001; long long int N, M, K, Q, W, H, L, R; long long int ans; long long int num[200000]; long double F(int n) { long double a = 0, b = 0; for (int i = 1; i <= n; i++) { a += pow(0.81, i); b += pow(0.9, i); } return sqrt(a) / b; } long double f(int n) { return (F(n) - 0.22941573387) / (F(1) - 0.22941573387)*1200; } long double G(long double n){ return pow(2.0, n / 800.0); } long double rating(int n) { long double a = 0, b = 0; for (int i = 0; i < n; i++) { a += G(num[i])*pow(0.9, i + 1); b += pow(0.9, i+1); } long double l = 0, r = 5000; long double mid = 2500; while(abs(G(mid)-a/b)>EPS){ mid = (l + r)/2; if (G(mid) > a / b)r = mid; else l = mid; //cout << G(mid)<<" "<> N; for (int i = 0; i < N; i++)cin >> num[i]; cout << round(rating(N)) << endl; return 0; }