


def 	_lowerCAmelCase       (    _lowerCAmelCase = 100_0000 )						->	int:


						'''simple docstring'''






						__snake_case				=		1
						__snake_case				=		1
						__snake_case				=		{1: 1}

						for inputa in range(2      ,	UpperCamelCase__ ):
												__snake_case				=		0
												__snake_case				=		inputa

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

												if inputa not in counters:
																		__snake_case				=		counter

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


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










from __future__ import annotations

from collections.abc import Iterator






class     UpperCamelCase:


					def __init__(						self	:		Union[str, Any]     ,    SCREAMING_SNAKE_CASE	:		int						)			->	None:




											'''simple docstring'''

											__snake_case				=		value
											__snake_case				=		None
											__snake_case				=		None






class     UpperCamelCase:


					def __init__(						self	:		int     ,    SCREAMING_SNAKE_CASE	:		Node						)			->	None:




											'''simple docstring'''

											__snake_case				=		tree


					def 							SCREAMING_SNAKE_CASE_  (						self	:		List[str]     ,    SCREAMING_SNAKE_CASE	:		Node | None						)			->	int:




											'''simple docstring'''

											if node is None:
																	return 0
											return node.value + (
											    self.depth_first_search(node.left						) + self.depth_first_search(node.right						)
											)






					def __iter__(						self	:		int						)			->	Iterator[int]:




											'''simple docstring'''

											yield self.depth_first_search(self.tree						)


if __name__ == "__main__":
	import doctest

	doctest.testmod()





