


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_					)       ->		float:
    if not nums:
        raise ValueError('List is empty'					)
    return sum(lowerCamelCase_					) / len(lowerCamelCase_					)


if __name__ == "__main__":
 import doctest

 doctest.testmod()


