n=int(input()) MAX=n ind=0 while n!=1: if n%2==0: n//=2 else: n=3*n+1 ind+=1 MAX=max(MAX,n) print(ind) print(MAX)