i=1;exec"n=i;exec'n=sum(int(c)**2for c in`n`);'*9\nif n<2:print i\ni+=1;"*2000