n0 = int(input()) m = n0 first = -1 for i in range(10**5): if n0 == 1 and first == -1: first = i if n0%2: n0 = n0*3+1 else: n0 = n0//2 m = max(m,n0) print(first) print(m)