#include using namespace std; int main(){ int n,in,sum=0,ans=0; vector v; cin >> n; while(cin >> in){ v.push_back(in);sum+=in; } int tmp=0,l=0,top; for(int i=1;;i+=2){ tmp+=i; if(tmp>sum) break; if(i==1) l++; else l+=2; top=i/2+1; } int p=(l>n)?l:n; for(int i=0;i=n) continue; if(top>i){ if(i+10)?top-(i+1-(l/2+1)):0; if(b