using C=System.Console;class o{static void Main(){for(int i=int.Parse(C.ReadLine())*2;i>1;)C.WriteLine(i=i%2>0?3*i+1:i/2);}}