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