first_n = int(input()) n = first_n i = 0 max_n = first_n while (not n==1): i += 1 if (n % 2): n = 3*n + 1 else: n = n/2 if n > max_n: max_n = n print(i) print(int(max_n))