



import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils import AddedToken
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_mpnet import MPNetTokenizer


__snake_case		:Dict 						=	logging.get_logger(__name__)

__snake_case		:List[str] 						=	{'''vocab_file''': '''vocab.txt''', '''tokenizer_file''': '''tokenizer.json'''}

__snake_case		:List[str] 						=	{
    '''vocab_file''': {
        '''microsoft/mpnet-base''': '''https://huggingface.co/microsoft/mpnet-base/resolve/main/vocab.txt''',
    },
    '''tokenizer_file''': {
        '''microsoft/mpnet-base''': '''https://huggingface.co/microsoft/mpnet-base/resolve/main/tokenizer.json''',
    },
}

__snake_case		:str 						=	{
    '''microsoft/mpnet-base''': 512,
}

__snake_case		:int 						=	{
    '''microsoft/mpnet-base''': {'''do_lower_case''': True},
}

class        _A			(      __UpperCAmelCase       ):
       UpperCamelCase__    :       Dict		   =		VOCAB_FILES_NAMES
       UpperCamelCase__    :       Any		   =		PRETRAINED_VOCAB_FILES_MAP
       UpperCamelCase__    :       Tuple		   =		PRETRAINED_INIT_CONFIGURATION
       UpperCamelCase__    :       Optional[Any]		   =		PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
       UpperCamelCase__    :       Dict		   =		MPNetTokenizer
       UpperCamelCase__    :       List[str]		   =		['''input_ids''', '''attention_mask''']



       def __init__(						self				:	Union[str, Any]	,						__SCREAMING_SNAKE_CASE				:	int=None	,						__SCREAMING_SNAKE_CASE				:	int=None	,						__SCREAMING_SNAKE_CASE				:	int=True	,						__SCREAMING_SNAKE_CASE				:	Dict="<s>"	,						__SCREAMING_SNAKE_CASE				:	Dict="</s>"	,						__SCREAMING_SNAKE_CASE				:	Tuple="</s>"	,						__SCREAMING_SNAKE_CASE				:	Union[str, Any]="<s>"	,						__SCREAMING_SNAKE_CASE				:	str="[UNK]"	,						__SCREAMING_SNAKE_CASE				:	int="<pad>"	,						__SCREAMING_SNAKE_CASE				:	Optional[Any]="<mask>"	,						__SCREAMING_SNAKE_CASE				:	Union[str, Any]=True	,						__SCREAMING_SNAKE_CASE				:	int=None	,						**__SCREAMING_SNAKE_CASE				:	List[str]	,						):


           '''simple docstring'''

           super().__init__(
               __SCREAMING_SNAKE_CASE	,						tokenizer_file=__SCREAMING_SNAKE_CASE	,						do_lower_case=__SCREAMING_SNAKE_CASE	,						bos_token=__SCREAMING_SNAKE_CASE	,						eos_token=__SCREAMING_SNAKE_CASE	,						sep_token=__SCREAMING_SNAKE_CASE	,						cls_token=__SCREAMING_SNAKE_CASE	,						unk_token=__SCREAMING_SNAKE_CASE	,						pad_token=__SCREAMING_SNAKE_CASE	,						mask_token=__SCREAMING_SNAKE_CASE	,						tokenize_chinese_chars=__SCREAMING_SNAKE_CASE	,						strip_accents=__SCREAMING_SNAKE_CASE	,						**__SCREAMING_SNAKE_CASE	,						)

           __a					=							json.loads(self.backend_tokenizer.normalizer.__getstate__())
           if (
               pre_tok_state.get('''lowercase'''	,						__SCREAMING_SNAKE_CASE) != do_lower_case
               or pre_tok_state.get('''strip_accents'''	,						__SCREAMING_SNAKE_CASE) != strip_accents
           ):
               __a					=							getattr(__SCREAMING_SNAKE_CASE	,						pre_tok_state.pop('''type'''))
               __a					=							do_lower_case
               __a					=							strip_accents
               __a					=							pre_tok_class(**__SCREAMING_SNAKE_CASE)

           __a					=							do_lower_case



       @property
       def 						_lowerCamelCase     (						self				:	Any):


           '''simple docstring'''

           if self._mask_token is None:
               if self.verbose:
                   logger.error('''Using mask_token, but it is not set yet.''')
               return None
           return str(self._mask_token)



       @mask_token.setter
       def 						_lowerCamelCase     (						self				:	List[Any]	,						__SCREAMING_SNAKE_CASE				:	Optional[int]):


           '''simple docstring'''

           __a					=							AddedToken(__SCREAMING_SNAKE_CASE	,						lstrip=__SCREAMING_SNAKE_CASE	,						rstrip=__SCREAMING_SNAKE_CASE) if isinstance(__SCREAMING_SNAKE_CASE	,						__SCREAMING_SNAKE_CASE) else value
           __a					=							value



       def 						_lowerCamelCase     (						self				:	int	,						__SCREAMING_SNAKE_CASE				:	Optional[Any]	,						__SCREAMING_SNAKE_CASE				:	Union[str, Any]=None):


           '''simple docstring'''

           __a					=							[self.bos_token_id] + token_ids_a + [self.eos_token_id]
           if token_ids_a is None:
               return output

           return output + [self.eos_token_id] + token_ids_a + [self.eos_token_id]



       def 						_lowerCamelCase     (						self				:	Tuple	,						__SCREAMING_SNAKE_CASE				:	List[int]	,						__SCREAMING_SNAKE_CASE				:	Optional[List[int]] = None):


           '''simple docstring'''

           __a					=							[self.sep_token_id]
           __a					=							[self.cls_token_id]

           if token_ids_a is None:
               return len(cls + token_ids_a + sep) * [0]
           return len(cls + token_ids_a + sep + sep + token_ids_a + sep) * [0]





       def 						_lowerCamelCase     (						self				:	Dict	,						__SCREAMING_SNAKE_CASE				:	str	,						__SCREAMING_SNAKE_CASE				:	Optional[str] = None):


           '''simple docstring'''

           __a					=							self._tokenizer.model.save(__SCREAMING_SNAKE_CASE	,						name=__SCREAMING_SNAKE_CASE)
           return tuple(__SCREAMING_SNAKE_CASE)










from __future__ import annotations

__snake_case		:Union[str, Any] 						=	{1: 1}





def 	__snake_case      (     _UpperCAmelCase							):
    if n in COLLATZ_SEQUENCE_LENGTHS:
        return COLLATZ_SEQUENCE_LENGTHS[n]
    __a					=							n // 2 if n % 2 == 0 else 3 * n + 1
    __a					=							collatz_sequence_length(_UpperCAmelCase							) + 1
    __a					=							sequence_length
    return sequence_length





def 	__snake_case      (     _UpperCAmelCase = 1000000							):
    __a					=							max((collatz_sequence_length(_UpperCAmelCase							), i) for i in range(1  ,					_UpperCAmelCase							)							)
    return result[1]


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





