import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def main(): mx=0 n=int(input()) i=0 while n!=1: if n>mx:mx=n if n%2:n=3*n+1 else:n//=2 i+=1 print(i) print(mx) main()