


def 							__lowercase       (			__lowerCAmelCase							:    int = 1_0_0_0_0_0_0       ):
							a__					=					1
							a__					=					1
							a__					=					{1: 1}

							for inputa in range(2 ,   __lowerCAmelCase       ):
														a__					=					0
														a__					=					inputa

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

														if inputa not in counters:
																					a__					=					counter

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


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








from collections import defaultdict
from math import ceil, sqrt






def 							__lowercase       (			__lowerCAmelCase							:    int = 1_0_0_0_0_0_0 ,   __lowerCAmelCase							:    int = 1_0       ):
							a__					=					defaultdict(__lowerCAmelCase       )

							for outer_width in range(3 ,   (t_limit // 4) + 2       ):
														if outer_width * outer_width > t_limit:
																					a__					=					max(
																					    ceil(sqrt(outer_width * outer_width - t_limit       )       ) ,   1       )
														else:
																					a__					=					1

														hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

														for hole_width in range(__lowerCAmelCase ,   outer_width - 1 ,   2       ):
																					count[outer_width * outer_width - hole_width * hole_width] += 1

							return sum(1 for n in count.values() if 1 <= n <= 1_0       )


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




