


def 							UpperCamelCase_( lowerCamelCase_ = 100_0000					)       ->		int:
    _lowercase			:				int 						=						1
    _lowercase			:				Any 						=						1
    _lowercase			:				Dict 						=						{1: 1}

    for inputa in range(2				,					lowerCamelCase_					):
        _lowercase			:				Any 						=						0
        _lowercase			:				Optional[int] 						=						inputa

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

        if inputa not in counters:
            _lowercase			:				str 						=						counter

        if counter > pre_counter:
            _lowercase			:				Optional[Any] 						=						inputa
            _lowercase			:				Tuple 						=						counter
    return largest_number


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








from __future__ import annotations





def        __UpperCAmelCase						(							lowerCamelCase_ :     list[float]  )       ->  float:







			"""simple docstring"""





			SCREAMING_SNAKE_CASE_   : Tuple					  =      0.0_0
			SCREAMING_SNAKE_CASE_   : Tuple					  =      0
			for resistor in resistors:
						if resistor <= 0:
									SCREAMING_SNAKE_CASE_   : Optional[Any]					  =      F'Resistor at index {index} has a negative or zero value!'
									raise ValueError(lowerCamelCase_  )
						first_sum += 1 / float(lowerCamelCase_  )
						index += 1
			return 1 / first_sum





def        __UpperCAmelCase						(							lowerCamelCase_ :     list[float]  )       ->  float:







			"""simple docstring"""





			SCREAMING_SNAKE_CASE_   : Dict					  =      0.0_0
			SCREAMING_SNAKE_CASE_   : Union[str, Any]					  =      0
			for resistor in resistors:
						sum_r += resistor
						if resistor < 0:
									SCREAMING_SNAKE_CASE_   : Union[str, Any]					  =      F'Resistor at index {index} has a negative value!'
									raise ValueError(lowerCamelCase_  )
						index += 1
			return sum_r


if __name__ == "__main__":
						import doctest

						doctest.testmod()



