n=-1 exec"s=n=n+1\nfor x in`n`*n:s-=int(x)*(s>0)\nif~s<0:print n\n"*500