n0 = int(input()) n = [n0] flag = True for i in range(400): if n[i] == 1 and flag == True: num = i flag = False break if n[i] % 2 == 0: n.append(n[i] // 2) else: n.append(3*n[i] + 1) print(num) print(max(n))