




'''simple docstring'''






import os
from shutil import copyfile
from typing import List, Optional, Tuple

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


if is_sentencepiece_available():
      from .tokenization_xlnet import XLNetTokenizer
else:
      A_			      =		None


A_			      =		logging.get_logger(__name__)

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

A_			      =		{
    "vocab_file": {
        "xlnet-base-cased": "https://huggingface.co/xlnet-base-cased/resolve/main/spiece.model",
        "xlnet-large-cased": "https://huggingface.co/xlnet-large-cased/resolve/main/spiece.model",
    },
    "tokenizer_file": {
        "xlnet-base-cased": "https://huggingface.co/xlnet-base-cased/resolve/main/tokenizer.json",
        "xlnet-large-cased": "https://huggingface.co/xlnet-large-cased/resolve/main/tokenizer.json",
    },
}

A_			      =		{
    "xlnet-base-cased": None,
    "xlnet-large-cased": None,
}

A_			      =		"▁"

# Segments (not really needed)
A_			      =		0
A_			      =		1
A_			      =		2
A_			      =		3
A_			      =		4






class        lowercase_      (						lowerCAmelCase_							):
     A_											=			VOCAB_FILES_NAMES
     A_											=			PRETRAINED_VOCAB_FILES_MAP
     A_											=			PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
     A_											=			"left"
     A_											=			XLNetTokenizer





     def __init__(     self     :					Union[str, Any]     ,							__lowerCamelCase     :					Tuple=None     ,							__lowerCamelCase     :					Tuple=None     ,							__lowerCamelCase     :					Optional[int]=False     ,							__lowerCamelCase     :					Tuple=True     ,							__lowerCamelCase     :					List[str]=False     ,							__lowerCamelCase     :					Any="<s>"     ,							__lowerCamelCase     :					int="</s>"     ,							__lowerCamelCase     :					Union[str, Any]="<unk>"     ,							__lowerCamelCase     :					List[Any]="<sep>"     ,							__lowerCamelCase     :					List[Any]="<pad>"     ,							__lowerCamelCase     :					Any="<cls>"     ,							__lowerCamelCase     :					List[str]="<mask>"     ,							__lowerCamelCase     :					str=["<eop>", "<eod>"]     ,							**__lowerCamelCase     :					List[str]     ,							):
           # Mask token behave like a normal word, i.e. include the space before it
           snake_case__       :   Tuple	      =    AddedToken(__lowerCamelCase     ,							lstrip=__lowerCamelCase     ,							rstrip=__lowerCamelCase			) if isinstance(__lowerCamelCase     ,							__lowerCamelCase			) else mask_token

           super().__init__(
               vocab_file=__lowerCamelCase     ,							tokenizer_file=__lowerCamelCase     ,							do_lower_case=__lowerCamelCase     ,							remove_space=__lowerCamelCase     ,							keep_accents=__lowerCamelCase     ,							bos_token=__lowerCamelCase     ,							eos_token=__lowerCamelCase     ,							unk_token=__lowerCamelCase     ,							sep_token=__lowerCamelCase     ,							pad_token=__lowerCamelCase     ,							cls_token=__lowerCamelCase     ,							mask_token=__lowerCamelCase     ,							additional_special_tokens=__lowerCamelCase     ,							**__lowerCamelCase     ,							)

           snake_case__       :   Any	      =    3
           snake_case__       :   List[Any]	      =    do_lower_case
           snake_case__       :   List[str]	      =    remove_space
           snake_case__       :   int	      =    keep_accents
           snake_case__       :   Dict	      =    vocab_file
           snake_case__       :   Any	      =    False if not self.vocab_file else True





     def 			_lowerCAmelCase      (     self     :					str     ,							__lowerCamelCase     :					List[int]     ,							__lowerCamelCase     :					Optional[List[int]] = None			):
           snake_case__       :   Any	      =    [self.sep_token_id]
           snake_case__       :   str	      =    [self.cls_token_id]
           if token_ids_a is None:
                 return token_ids_a + sep + cls
           return token_ids_a + sep + token_ids_a + sep + cls





     def 			_lowerCAmelCase      (     self     :					Optional[int]     ,							__lowerCamelCase     :					List[int]     ,							__lowerCamelCase     :					Optional[List[int]] = None			):
           snake_case__       :   List[str]	      =    [self.sep_token_id]
           snake_case__       :   int	      =    [2]

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





     def 			_lowerCAmelCase      (     self     :					List[str]     ,							__lowerCamelCase     :					str     ,							__lowerCamelCase     :					Optional[str] = None			):
           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
           snake_case__       :   int	      =    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'''






def 		UpperCamelCase__      (		__SCREAMING_SNAKE_CASE		)    ->   int:
      if n == 1 or not isinstance(__SCREAMING_SNAKE_CASE				,      __SCREAMING_SNAKE_CASE		):
            return 0
      elif n == 2:
            return 1
      else:
            snake_case__       :   int	      =    [0, 1]
            for i in range(2				,      n + 1		):
                  sequence.append(sequence[i - 1] + sequence[i - 2]		)

            return sequence[n]






def 		UpperCamelCase__      (		__SCREAMING_SNAKE_CASE		)    ->   int:
      snake_case__       :   Optional[int]	      =    0
      snake_case__       :   Dict	      =    2

      while digits < n:
            index += 1
            snake_case__       :   Optional[int]	      =    len(str(fibonacci(__SCREAMING_SNAKE_CASE		)		)		)

      return index






def 		UpperCamelCase__      (		__SCREAMING_SNAKE_CASE = 1000		)    ->   int:
      return fibonacci_digits_index(__SCREAMING_SNAKE_CASE		)


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