1.upto(2e3){|n|m=n;1while(m=eval"#{m}".gsub /./,'+\0*\0')>4;m>1or p n}