lst = [] S = int(input().strip()) lst.append(S) while True: if S == 1: break if S % 2 == 0: S = S / 2 else: S = 3 * S + 1 if S in lst: break lst.append(S) print('{}\n{}'.format(len(lst) - 1, int(max(lst))))