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