import sys; input = sys.stdin.buffer.readline sys.setrecursionlimit(10**7) from collections import defaultdict con = 10 ** 9 + 7; INF = float("inf") def getlist(): return list(map(int, input().split())) #処理内容 def main(): table = [0] * 500 n0 = int(input()) table[0] = n0 itr = None val = 0 for i in range(450): val = max(val, table[i]) if table[i] % 2 == 0: table[i + 1] = int(table[i] // 2) else: table[i + 1] = 3 * table[i] + 1 if table[i + 1] == 1: itr = i + 1 break print(itr) print(val) if __name__ == '__main__': main()