using C=System.Console;class P{static void Main(){for(int b,n=b=int.Parse(C.ReadLine());b>1;n=n%2>0?3*n+1:n/2)C.WriteLine(b=n);}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page