




import json
import os
import unittest

from transformers.models.xlm.tokenization_xlm import VOCAB_FILES_NAMES, XLMTokenizer
from transformers.testing_utils import slow

from ...test_tokenization_common import TokenizerTesterMixin




class 		UpperCamelCase__	(lowerCAmelCase__    ,				unittest.TestCase     ):

    '''simple docstring'''



    lowerCamelCase_      :	Optional[int]	     =      XLMTokenizer
    lowerCamelCase_      :	Dict	     =      False







    def     _lowercase     (    self     )     ->      List[Any]:
           super().setUp()

           # Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
           lowerCamelCase   :      Union[str, Any]			 =					[
               "l",
               "o",
               "w",
               "e",
               "r",
               "s",
               "t",
               "i",
               "d",
               "n",
               "w</w>",
               "r</w>",
               "t</w>",
               "lo",
               "low",
               "er</w>",
               "low</w>",
               "lowest</w>",
               "newer</w>",
               "wider</w>",
               "<unk>",
           ]
           lowerCamelCase   :      Optional[Any]			 =					dict(zip(UpperCamelCase__     ,  range(len(UpperCamelCase__     )     )     )     )
           lowerCamelCase   :      Any			 =					["l o 123", "lo w 1456", "e r</w> 1789", ""]

           lowerCamelCase   :      List[Any]			 =					os.path.join(self.tmpdirname     ,  VOCAB_FILES_NAMES["vocab_file"]     )
           lowerCamelCase   :      Union[str, Any]			 =					os.path.join(self.tmpdirname     ,  VOCAB_FILES_NAMES["merges_file"]     )
           with open(self.vocab_file     ,  "w"     ) as fp:
                  fp.write(json.dumps(UpperCamelCase__     )     )
           with open(self.merges_file     ,  "w"     ) as fp:
                  fp.write("\n".join(UpperCamelCase__     )     )







    def     _lowercase     (    self     ,  UpperCamelCase__     )     ->      str:
           lowerCamelCase   :      Union[str, Any]			 =					"lower newer"
           lowerCamelCase   :      List[Any]			 =					"lower newer"
           return input_text, output_text







    def     _lowercase     (    self     )     ->      List[Any]:
           lowerCamelCase   :      str			 =					XLMTokenizer(self.vocab_file     ,  self.merges_file     )

           lowerCamelCase   :      Tuple			 =					"lower"
           lowerCamelCase   :      Optional[int]			 =					["low", "er</w>"]
           lowerCamelCase   :      Any			 =					tokenizer.tokenize(UpperCamelCase__     )
           self.assertListEqual(UpperCamelCase__     ,  UpperCamelCase__     )

           lowerCamelCase   :      Dict			 =					tokens + ["<unk>"]
           lowerCamelCase   :      List[Any]			 =					[14, 15, 20]
           self.assertListEqual(tokenizer.convert_tokens_to_ids(UpperCamelCase__     )     ,  UpperCamelCase__     )







    @slow
    def     _lowercase     (    self     )     ->      Optional[Any]:
           lowerCamelCase   :      Union[str, Any]			 =					XLMTokenizer.from_pretrained("xlm-mlm-en-2048"     )

           lowerCamelCase   :      int			 =					tokenizer.encode("sequence builders"     ,  add_special_tokens=UpperCamelCase__     )
           lowerCamelCase   :      Optional[Any]			 =					tokenizer.encode("multi-sequence build"     ,  add_special_tokens=UpperCamelCase__     )

           lowerCamelCase   :      Union[str, Any]			 =					tokenizer.build_inputs_with_special_tokens(UpperCamelCase__     )
           lowerCamelCase   :      Any			 =					tokenizer.build_inputs_with_special_tokens(UpperCamelCase__     ,  UpperCamelCase__     )

           assert encoded_sentence == [0] + text + [1]
           assert encoded_pair == [0] + text + [1] + text_a + [1]












def      A      (      _SCREAMING_SNAKE_CASE = 100_0000    )	-> int:
       lowerCamelCase   :      Tuple			 =					1
       lowerCamelCase   :      int			 =					1
       lowerCamelCase   :      Optional[Any]			 =					{1: 1}

       for inputa in range(2 ,_SCREAMING_SNAKE_CASE    ):
              lowerCamelCase   :      Union[str, Any]			 =					0
              lowerCamelCase   :      List[str]			 =					inputa

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

              if inputa not in counters:
                     lowerCamelCase   :      str			 =					counter

              if counter > pre_counter:
                     lowerCamelCase   :      str			 =					inputa
                     lowerCamelCase   :      Any			 =					counter
       return largest_number


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






