ll@N,@M,a=0,t,m;if(N<2)wt("NaN");else{auto s=sqrt(N);while(M)a++,M-=AND[i,m=a/s,m+2](a!=(t=i*s));wt(a);}