import sequtils,strutils var n = stdin.readline.parseInt Nmax = n i1 = 0 while n != 1: i1 += 1 if n mod 2 == 0: n = n div 2 else: n = n * 3 + 1 Nmax = max(Nmax, n) echo i1 echo Nmax