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