#include using namespace std; using int64 = long long; using uint64 = unsigned long long; constexpr long double Finf = sqrtl(0.81 / (1 - 0.81)) / (0.9 / (1 - 0.9)); long double F(int n) { long double a = 0, b = 0; for (int i = 0; i < n; i++) { a += powl(0.81, i + 1); b += powl(0.9, i + 1); } return sqrtl(a) / b; } long double f(int n) { return 1200 * (F(n) - Finf) / (F(1) - Finf); } long double g(long double x) { return powl(2.0, x / 800); } // log_a bを計算 long double log(long double a, long double b) { return logl(b) / logl(a); } long double ginv(long double x) { return 800 * log(2.0, x); } int rating(vector perf) { long double a = 0, b = 0; int n = perf.size(); for (int i = 0; i < n; i++) { a += g(perf[i]) * powl(0.9, i + 1); b += powl(0.9, i + 1); } return (int)(ginv(a) - ginv(b) - f(n) + 0.000005); } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int N; cin >> N; vector perf(N); for (int i = 0; i < N; i++) { cin >> perf[i]; } cout << rating(perf) << endl; return 0; }