prm = int(input()) tmp = prm max = tmp i = 0 while tmp != 1: i += 1 max = [max, tmp][max < tmp] if tmp % 2 == 0: tmp = tmp / 2 else: tmp = tmp * 3 + 1 print(int(i)) print(int(max))