n = list() n += [int(input())] while n[-1] != 1: if n[-1] % 2 == 0: n += [n[-1] // 2] else: n += [3 * n[-1] + 1] print(len(n) - 1) print(max(n))