a = int(input()) i, m = 0, 0 while a != 1: i += 1 if a%2: a = 3*a + 1 else: a = a // 2 m = max(a, m) print(i) print(m)