n = int(input()) max_n = n count = 0 while n != 1: count += 1 if n % 2 == 0: n //= 2 else: n = 3 * n + 1 if max_n < n: max_n = n print(count) print(max_n)