
import json
from typing import TYPE_CHECKING, List, Optional, Tuple

from tokenizers import pre_tokenizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging


if TYPE_CHECKING:
     from transformers.pipelines.conversational import Conversation


lowerCamelCase__     :		Union[str, Any]        = logging.get_logger(__name__)

lowerCamelCase__     :		Optional[int]        = {"""vocab_file""": """vocab.json""", """merges_file""": """merges.txt""", """tokenizer_file""": """tokenizer.json"""}

lowerCamelCase__     :		Union[str, Any]        = {
    """tokenizer_file""": {
        """EleutherAI/gpt-neox-20b""": """https://huggingface.co/EleutherAI/gpt-neox-20b/resolve/main/tokenizer.json""",
    },
}

lowerCamelCase__     :		Optional[Any]        = {
    """gpt-neox-20b""": 2_0_4_8,
}



class    _snake_case (						UpperCAmelCase_				):
 __lowerCAmelCase	:  Tuple	   =      VOCAB_FILES_NAMES
 __lowerCAmelCase	:  List[str]	   =      PRETRAINED_VOCAB_FILES_MAP
 __lowerCAmelCase	:  Optional[int]	   =      PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
 __lowerCAmelCase	:  Dict	   =      ['input_ids', 'attention_mask']


 def __init__(       self       ,	SCREAMING_SNAKE_CASE_=None       ,	SCREAMING_SNAKE_CASE_=None       ,	SCREAMING_SNAKE_CASE_=None       ,	SCREAMING_SNAKE_CASE_="<|endoftext|>"       ,	SCREAMING_SNAKE_CASE_="<|endoftext|>"       ,	SCREAMING_SNAKE_CASE_="<|endoftext|>"       ,	SCREAMING_SNAKE_CASE_=False       ,	**SCREAMING_SNAKE_CASE_       ,	):


   '''simple docstring'''




   super().__init__(
       SCREAMING_SNAKE_CASE_       ,	SCREAMING_SNAKE_CASE_       ,	tokenizer_file=SCREAMING_SNAKE_CASE_       ,	unk_token=SCREAMING_SNAKE_CASE_       ,	bos_token=SCREAMING_SNAKE_CASE_       ,	eos_token=SCREAMING_SNAKE_CASE_       ,	add_prefix_space=SCREAMING_SNAKE_CASE_       ,	**SCREAMING_SNAKE_CASE_       ,	)

   lowercase__	: List[str]     		=   json.loads(self.backend_tokenizer.pre_tokenizer.__getstate__())
   if pre_tok_state.get("""add_prefix_space"""       ,	SCREAMING_SNAKE_CASE_) != add_prefix_space:
     lowercase__	: Optional[Any]     		=   getattr(SCREAMING_SNAKE_CASE_       ,	pre_tok_state.pop("""type"""))
     lowercase__	: List[Any]     		=   add_prefix_space
     lowercase__	: Union[str, Any]     		=   pre_tok_class(**SCREAMING_SNAKE_CASE_)

   lowercase__	: Union[str, Any]     		=   add_prefix_space


 def   lowercase__  (       self       ,	SCREAMING_SNAKE_CASE_       ,	SCREAMING_SNAKE_CASE_ = None):


   '''simple docstring'''




   lowercase__	: Union[str, Any]     		=   self._tokenizer.model.save(SCREAMING_SNAKE_CASE_       ,	name=SCREAMING_SNAKE_CASE_)
   return tuple(SCREAMING_SNAKE_CASE_)



 def   lowercase__  (       self       ,	SCREAMING_SNAKE_CASE_):


   '''simple docstring'''




   lowercase__	: Dict     		=   []
   for is_user, text in conversation.iter_texts():
     input_ids.extend(self.encode(SCREAMING_SNAKE_CASE_       ,	add_special_tokens=SCREAMING_SNAKE_CASE_) + [self.eos_token_id])

   if len(SCREAMING_SNAKE_CASE_) > self.model_max_length:
     lowercase__	: Any     		=   input_ids[-self.model_max_length :]
   return input_ids








def 		UpperCamelCase						(   lowercase_ )		->						int:


  '''simple docstring'''






  if n == 1 or not isinstance(lowercase_			,			lowercase_ ):
    return 0
  elif n == 2:
    return 1
  else:
    lowercase__	: List[Any]     		=   [0, 1]
    for i in range(2			,			n + 1 ):
      sequence.append(sequence[i - 1] + sequence[i - 2] )

    return sequence[n]

def 		UpperCamelCase						(   lowercase_ )		->						int:


  '''simple docstring'''






  lowercase__	: Optional[Any]     		=   0
  lowercase__	: Dict     		=   2

  while digits < n:
    index += 1
    lowercase__	: str     		=   len(str(fibonacci(lowercase_ ) ) )

  return index

def 		UpperCamelCase						(   lowercase_ = 10_00 )		->						int:


  '''simple docstring'''






  return fibonacci_digits_index(lowercase_ )


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






