n0 = int(input()) cnt = 1 max_n = n0 while 1: n_i = n0//2 if n0%2 == 0 else 3*n0+1 if n_i == 1: print(cnt) print(max_n) break else: n0 = n_i max_n = max(max_n,n0) cnt += 1