#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n; vector a(n); for(Int i=0;i>a[i]; while(a.size()<300u) a.emplace_back(0); n=a.size(); Int s=0; for(Int x:a) s+=x; Int ans=s*10000; for(Int i=1;i*2-1