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