n = int(input()) i = 0 M = n while True: if n == 1: break if n%2 == 0: n //= 2 else: n = 3 * n + 1 i += 1 M = max(M,n) print(i) print(M)