N = int(input()) result = [] while N > 1: if N % 2: N = 3 * N + 1 else: N = N // 2 result.append(N) print(len(result)) print(max(result))