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