a=[] a.append(int(input())) i=0 max=0 while not a[i]==1: if a[i]%2==0: a.append(int(a[i]/2)) else: a.append(int((3*a[i])+1)) if max<=a[i]: max=a[i] print(f"{i}\n{max}")