import itertools from sys import stdin def main(): input = lambda: stdin.readline()[:-1] N = int(input()) collatz = [N] for i in itertools.count(0): if collatz[i] % 2: n = collatz[i] * 3 + 1 else: n = collatz[i] // 2 collatz.append(n) if n == 1: break print(i + 1, max(collatz), sep='\n') main()