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