


import json
import os
import unittest

from transformers.models.biogpt.tokenization_biogpt import VOCAB_FILES_NAMES, BioGptTokenizer
from transformers.testing_utils import slow

from ...test_tokenization_common import TokenizerTesterMixin







class 		_snake_case  (      _snake_case						,    unittest.TestCase							):
 SCREAMING_SNAKE_CASE__      =       BioGptTokenizer
 SCREAMING_SNAKE_CASE__      =       False




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       super().setUp()

       # Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
       a						:Optional[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>''',
       ]
       a						:Optional[Any] 							=       dict(zip(_lowerCamelCase					,  range(len(_lowerCamelCase    )    )    )    )
       a						:Any 							=       ['''l o 123''', '''lo w 1456''', '''e r</w> 1789''', '''''']

       a						:List[Any] 							=       os.path.join(self.tmpdirname					,  VOCAB_FILES_NAMES['''vocab_file''']    )
       a						:Optional[Any] 							=       os.path.join(self.tmpdirname					,  VOCAB_FILES_NAMES['''merges_file''']    )
       with open(self.vocab_file					,  '''w'''    ) as fp:
             fp.write(json.dumps(_lowerCamelCase    )    )
       with open(self.merges_file					,  '''w'''    ) as fp:
             fp.write('''\n'''.join(_lowerCamelCase    )    )




 def        SCREAMING_SNAKE_CASE__				(		self					,  _lowerCamelCase    ):
       a						:Dict 							=       '''lower newer'''
       a						:str 							=       '''lower newer'''
       return input_text, output_text




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:Tuple 							=       BioGptTokenizer(self.vocab_file					,  self.merges_file    )

       a						:Union[str, Any] 							=       '''lower'''
       a						:Tuple 							=       ['''low''', '''er</w>''']
       a						:str 							=       tokenizer.tokenize(_lowerCamelCase    )
       self.assertListEqual(_lowerCamelCase					,  _lowerCamelCase    )

       a						:int 							=       tokens + ['''<unk>''']
       a						:Optional[int] 							=       [14, 15, 20]
       self.assertListEqual(tokenizer.convert_tokens_to_ids(_lowerCamelCase    )					,  _lowerCamelCase    )




 @slow
 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:Dict 							=       BioGptTokenizer.from_pretrained('''microsoft/biogpt'''    )

       a						:Any 							=       tokenizer.encode('''sequence builders'''					,  add_special_tokens=_lowerCamelCase    )
       a						:List[Any] 							=       tokenizer.encode('''multi-sequence build'''					,  add_special_tokens=_lowerCamelCase    )

       a						:int 							=       tokenizer.build_inputs_with_special_tokens(_lowerCamelCase    )
       a						:str 							=       tokenizer.build_inputs_with_special_tokens(_lowerCamelCase					,  _lowerCamelCase    )

       self.assertTrue(encoded_sentence == [2] + text    )
       self.assertTrue(encoded_pair == [2] + text + [2] + text_a    )









def 				__lowerCamelCase						( UpperCAmelCase_						:		int = 1000						):




      """simple docstring"""





      a							,				a						:int 							=       1, 1
      a						:Any 							=       2
      while True:
            a						:Optional[int] 							=       0
            a						:str 							=       fa + fa
            a							,				a						:List[Any] 							=       fa, f
            index += 1
            for _ in str(UpperCAmelCase_						):
                  i += 1
            if i == n:
                  break
      return index


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





