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