





'''simple docstring'''






def   UpperCamelCase__ (						lowerCAmelCase = 1_00_00_00    ):





      """simple docstring"""


      _lowerCAmelCase					=				1
      _lowerCAmelCase					=				1
      _lowerCAmelCase					=				{1: 1}

      for inputa in range(2				,      lowerCAmelCase    ):
            _lowerCAmelCase					=				0
            _lowerCAmelCase					=				inputa

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

            if inputa not in counters:
                  _lowerCAmelCase					=				counter

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


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













'''simple docstring'''






from ..utils import DummyObject, requires_backends




class 					UpperCAmelCase	(     metaclass=snake_case_  ):
      _lowercase:     List[Any]			=  ['''torch''', '''scipy''']




      def __init__(     self     :					Tuple     ,     *__snake_case     :					Dict     ,     **__snake_case     :					List[str]    )							-> str:
            requires_backends(self     ,     ["""torch""", """scipy"""]    )




      @classmethod
      def 							lowercase__       (     cls     :					str     ,     *__snake_case     :					List[str]     ,     **__snake_case     :					str    )							-> Tuple:
            requires_backends(cls     ,     ["""torch""", """scipy"""]    )




      @classmethod
      def 							lowercase__       (     cls     :					Optional[int]     ,     *__snake_case     :					int     ,     **__snake_case     :					Union[str, Any]    )							-> Optional[int]:
            requires_backends(cls     ,     ["""torch""", """scipy"""]    )






