




def      _a				(						SCREAMING_SNAKE_CASE_							:    int = 1_00_00_00					):
					__lowerCAmelCase           =	1
					__lowerCAmelCase           =	1
					__lowerCAmelCase           =	{1: 1}

					for inputa in range(2				,				__lowerCAmelCase					):
										__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())))










import math







def      _a				(						SCREAMING_SNAKE_CASE_							:    int					):

					if 1 < number < 4:
										# 2 and 3 are primes
										return True
					elif number < 2 or number % 2 == 0 or number % 3 == 0:
										# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
										return False

					# All primes number are in format of 6k +/- 1
					for i in range(5				,				int(math.sqrt(SCREAMING_SNAKE_CASE_					) + 1					)				,				6					):
										if number % i == 0 or number % (i + 2) == 0:
															return False
					return True







def      _a				(						SCREAMING_SNAKE_CASE_							:    float = 0.1					):
					__lowerCAmelCase           =	3
					__lowerCAmelCase           =	3

					while primes / (2 * j - 1) >= ratio:
										for i in range(j * j + j + 1				,				(j + 2) * (j + 2)				,				j + 1					):
															primes += is_prime(SCREAMING_SNAKE_CASE_					)
										j += 2
					return j


if __name__ == "__main__":
					import doctest

					doctest.testmod()




