

from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


_lowerCamelCase							=logging.get_logger(__name__)

_lowerCamelCase							={
    "facebook/convnext-tiny-224": "https://huggingface.co/facebook/convnext-tiny-224/resolve/main/config.json",
    # See all ConvNeXT models at https://huggingface.co/models?filter=convnext
}



class 						a_			(				lowerCamelCase_					,     lowerCamelCase_	):



      """simple docstring"""







      __UpperCAmelCase     						= 'convnext'
      def __init__( self	:				Tuple     ,snake_case	:				int=3     ,snake_case	:				List[Any]=4     ,snake_case	:				Union[str, Any]=4     ,snake_case	:				List[str]=None     ,snake_case	:				Tuple=None     ,snake_case	:				int="gelu"     ,snake_case	:				List[str]=0.02     ,snake_case	:				Union[str, Any]=1e-12     ,snake_case	:				Optional[int]=1e-6     ,snake_case	:				Tuple=0.0     ,snake_case	:				Optional[Any]=224     ,snake_case	:				Dict=None     ,snake_case	:				List[str]=None     ,**snake_case	:				int     ,):
           super().__init__(**snake_case							)

           SCREAMING_SNAKE_CASE 		=num_channels
           SCREAMING_SNAKE_CASE 		=patch_size
           SCREAMING_SNAKE_CASE 		=num_stages
           SCREAMING_SNAKE_CASE 		=[96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
           SCREAMING_SNAKE_CASE 		=[3, 3, 9, 3] if depths is None else depths
           SCREAMING_SNAKE_CASE 		=hidden_act
           SCREAMING_SNAKE_CASE 		=initializer_range
           SCREAMING_SNAKE_CASE 		=layer_norm_eps
           SCREAMING_SNAKE_CASE 		=layer_scale_init_value
           SCREAMING_SNAKE_CASE 		=drop_path_rate
           SCREAMING_SNAKE_CASE 		=image_size
           SCREAMING_SNAKE_CASE 		=['stem'] + [f'stage{idx}' for idx in range(1     ,len(self.depths							) + 1							)]
           SCREAMING_SNAKE_CASE		,    SCREAMING_SNAKE_CASE 		=get_aligned_output_features_output_indices(
               out_features=snake_case     ,out_indices=snake_case     ,stage_names=self.stage_names							)







class 						a_			(				lowerCamelCase_	):



      """simple docstring"""







      __UpperCAmelCase     						= version.parse('1.11'	)
      @property
      def 			_lowerCAmelCase	( self	:				List[Any]							):
           return OrderedDict(
               [
                   ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
               ]							)


      @property
      def 			_lowerCAmelCase	( self	:				int							):
           return 1e-5




from __future__ import annotations

_lowerCamelCase							={1: 1}







def      snake_case__							(  lowerCAmelCase_     ):





     """simple docstring"""







     if n in COLLATZ_SEQUENCE_LENGTHS:
          return COLLATZ_SEQUENCE_LENGTHS[n]
     SCREAMING_SNAKE_CASE 		=n // 2 if n % 2 == 0 else 3 * n + 1
     SCREAMING_SNAKE_CASE 		=collatz_sequence_length(lowerCAmelCase_     ) + 1
     SCREAMING_SNAKE_CASE 		=sequence_length
     return sequence_length







def      snake_case__							(  lowerCAmelCase_ = 1000000     ):





     """simple docstring"""







     SCREAMING_SNAKE_CASE 		=max((collatz_sequence_length(lowerCAmelCase_     ), i) for i in range(1,       lowerCAmelCase_     )     )
     return result[1]


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

