




'''simple docstring'''
import os
from shutil import copyfile
from typing import Optional, Tuple

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import is_sentencepiece_available, logging


if is_sentencepiece_available():
  from .tokenization_reformer import ReformerTokenizer
else:
  A							:      str 	=       None


A							:      int 	=       logging.get_logger(__name__)


A							:      Any 	=       """▁"""

A							:      str 	=       {"""vocab_file""": """spiece.model""", """tokenizer_file""": """tokenizer.json"""}

A							:      str 	=       {
    """vocab_file""": {
        """google/reformer-crime-and-punishment""": (
            """https://huggingface.co/google/reformer-crime-and-punishment/resolve/main/spiece.model"""
        )
    },
    """tokenizer_file""": {
        """google/reformer-crime-and-punishment""": (
            """https://huggingface.co/google/reformer-crime-and-punishment/resolve/main/tokenizer.json"""
        )
    },
}

A							:      Any 	=       {
    """google/reformer-crime-and-punishment""": 524_288,
}






class        SCREAMING_SNAKE_CASE(				__A     ):
       snake_case_ :     Any    =					VOCAB_FILES_NAMES
       snake_case_ :     List[str]    =					PRETRAINED_VOCAB_FILES_MAP
       snake_case_ :     Tuple    =					PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
       snake_case_ :     Tuple    =					["""input_ids""", """attention_mask"""]
       snake_case_ :     Dict    =					ReformerTokenizer

       def __init__(    self					,		lowerCamelCase__=None					,		lowerCamelCase__=None					,		lowerCamelCase__="</s>"					,		lowerCamelCase__="<unk>"					,		lowerCamelCase__=[]					,		**lowerCamelCase__					,		)    ->					Tuple:

           """simple docstring"""



           super().__init__(
               lowerCamelCase__					,		tokenizer_file=lowerCamelCase__					,		eos_token=lowerCamelCase__					,		unk_token=lowerCamelCase__					,		additional_special_tokens=lowerCamelCase__					,		**lowerCamelCase__					,		)

           __lowercase							=						vocab_file
           __lowercase							=						False if not self.vocab_file else True




       def     snake_case__			(    self					,		lowerCamelCase__					,		lowerCamelCase__ = None     )    ->					Tuple[str]:

           """simple docstring"""



           if not self.can_save_slow_tokenizer:
               raise ValueError(
                   """Your fast tokenizer does not have the necessary information to save the vocabulary for a slow """
                   """tokenizer."""     )

           if not os.path.isdir(lowerCamelCase__     ):
               logger.error(F'Vocabulary path ({save_directory}) should be a directory'     )
               return
           __lowercase							=						os.path.join(
               lowerCamelCase__					,		(filename_prefix + """-""" if filename_prefix else """""") + VOCAB_FILES_NAMES["""vocab_file"""]     )

           if os.path.abspath(self.vocab_file     ) != os.path.abspath(lowerCamelCase__     ):
               copyfile(self.vocab_file					,		lowerCamelCase__     )

           return (out_vocab_file,)










'''simple docstring'''
from __future__ import annotations

A							:      List[str] 	=       {1: 1}
def 				snake_case_  (   a__		:	int			):



    """simple docstring"""




    if n in COLLATZ_SEQUENCE_LENGTHS:
        return COLLATZ_SEQUENCE_LENGTHS[n]
    __lowercase							=						n // 2 if n % 2 == 0 else 3 * n + 1
    __lowercase							=						collatz_sequence_length(a__			) + 1
    __lowercase							=						sequence_length
    return sequence_length
def 				snake_case_  (   a__		:	int = 1_00_00_00			):



    """simple docstring"""




    __lowercase							=						max((collatz_sequence_length(a__			), i) for i in range(1    ,a__			)			)
    return result[1]


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




