




"""simple docstring"""




def     a__ (				snake_case__ = 1_00_00_00				)						->					int:
			lowerCamelCase			      =					1
			lowerCamelCase			      =					1
			lowerCamelCase			      =					{1: 1}

			for inputa in range(2       , lowercase_				):
						lowerCamelCase			      =					0
						lowerCamelCase			      =					inputa

						while True:
									if number in counters:
												counter += counters[number]
												break
									if number % 2 == 0:
												number //= 2
												counter += 1
									else:
												lowerCamelCase			      =					(3 * number) + 1
												counter += 1

						if inputa not in counters:
									lowerCamelCase			      =					counter

						if counter > pre_counter:
									lowerCamelCase			      =					inputa
									lowerCamelCase			      =					counter
			return largest_number


if __name__ == "__main__":
					print(solution(int(input().strip())))






def 						UpperCamelCase					(lowercase_: int = 10					)     ->      str:
	if not isinstance(lowercase_    ,      lowercase_					) or n < 0:
		raise ValueError("""Invalid input"""					)
	A__							:    List[str]        =		10**n
	A__							:    Any        =		28433 * (pow(2    ,      7830457    ,      lowercase_					)) + 1
	return str(number % modulus					)


if __name__ == "__main__":
	from doctest import testmod

	testmod()
	print(f'''{solution(10) = }''')



