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