import strutils var n: int = stdin.readline.parseInt cnt: int = 0 nmax: int = n while n != 1: cnt.inc if n mod 2 == 0: n = n div 2 else: n = 3 * n + 1 nmax = max(nmax, n) echo cnt echo nmax