nx=n=int(input()) i=0 while n>1: n=[n//2,n*3+1][n%2] nx=max(nx,n) i+=1 print(i) print(nx)