#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVI; typedef vector VVL; typedef pair P; typedef pair PL; double F(int n){ double a = 0, b = 0; FOR(i,1,n){ a += pow(0.81, i); b += pow(0.9, i); } return sqrt(a) / b; } double f(int n){ return 1200.0 * (F(n) - F(1e5)) / (F(1) - F(1e5)); } double g(double x){ return pow(2.0, x/800.0); } double ginv(double x){ double l = -100, r = 1e9; REP(i,100){ double mi = (l + r) / 2; if (g(mi) > x) r = mi; else l = mi; } return l; } int main(){ int n; cin >> n; double a = 0, b = 0; REP(i,n){ double p; cin >> p; a += g(p) * pow(0.9, (i+1)); b += pow(0.9, (i+1)); } // cout << ginv(a/b) << " " << f(n) << endl; printf("%d\n", (int)(ginv(a/b) - f(n))); return 0; }