n=int(input()) a=[n] c=n for i in range(500): if c%2==0: a.append(c//2) else: a.append(3*c+1) if c==1: break print(len(a)) print(max(a))