






"""simple docstring"""



def        _lowerCAmelCase						(							UpperCAmelCase__    :   int = 1_0_0_0_0_0_0 )						->int:
						A__  :					Optional[Any]											=					1
						A__  :					List[Any]											=					1
						A__  :					List[Any]											=					{1: 1}

						for inputa in range(2,  UpperCAmelCase__ ):
												A__  :					List[str]											=					0
												A__  :					Optional[int]											=					inputa

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

												if inputa not in counters:
																		A__  :					str											=					counter

												if counter > pre_counter:
																		A__  :					str											=					inputa
																		A__  :					Tuple											=					counter
						return largest_number


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














"""simple docstring"""



from collections import defaultdict
from math import gcd




def        _lowerCAmelCase						(							UpperCAmelCase__    :   int = 1_5_0_0_0_0_0 )						->int:
						A__  :					defaultdict											=					defaultdict(UpperCAmelCase__ )
						A__  :					Any											=					2
						while 2 * euclid_m * (euclid_m + 1) <= limit:
												for euclid_n in range((euclid_m % 2) + 1,  UpperCAmelCase__,  2 ):
																		if gcd(UpperCAmelCase__,  UpperCAmelCase__ ) > 1:
																								continue
																		A__  :					str											=					2 * euclid_m * (euclid_m + euclid_n)
																		for perimeter in range(UpperCAmelCase__,  limit + 1,  UpperCAmelCase__ ):
																								frequencies[perimeter] += 1
												euclid_m += 1
						return sum(1 for frequency in frequencies.values() if frequency == 1 )


if __name__ == "__main__":
						print(F'{solution() = }')






