N = int(input()) max = N now = N x = 0 for i in range(1, 401): if now % 2 == 0: now = now // 2 else: now = 3*now + 1 if now == 1: x = i break if max < now: max = now print(x) print(max)