





from __future__ import annotations

_UpperCAmelCase				       = {1: 1}




def        lowerCAmelCase_       (							UpperCamelCase_     )   ->						int:
       if n in COLLATZ_SEQUENCE_LENGTHS:
              return COLLATZ_SEQUENCE_LENGTHS[n]
       UpperCamelCase_      				=     n // 2 if n % 2 == 0 else 3 * n + 1
       UpperCamelCase_      				=     collatz_sequence_length(UpperCamelCase_     ) + 1
       UpperCamelCase_      				=     sequence_length
       return sequence_length




def        lowerCAmelCase_       (							UpperCamelCase_ = 1000000     )   ->						int:
       UpperCamelCase_      				=     max((collatz_sequence_length(UpperCamelCase_     ), i) for i in range(1    ,						UpperCamelCase_     )     )
       return result[1]


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








import warnings

from .generation import GenerationMixin



class 							_UpperCamelCase    (		lowerCAmelCase_   ):
       # warning at import time
       warnings.warn(
           '''Importing `GenerationMixin` from `src/transformers/generation_utils.py` is deprecated and will '''
           '''be removed in Transformers v5. Import as `from transformers import GenerationMixin` instead.'''     ,  lowerCAmelCase_     ,  )

