n = int(input()) i = 0 n_max = n while n != 1: if n % 2 == 0: n = n // 2 else: n = 3 * n + 1 i += 1 if n > n_max: n_max = n print(i) print(n_max)