





'''simple docstring'''

import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_funnel import FunnelTokenizer


UpperCAmelCase					:		Optional[int]		=							logging.get_logger(__name__)

UpperCAmelCase					:		Union[str, Any]		=							{'vocab_file': 'vocab.txt', 'tokenizer_file': 'tokenizer.json'}

UpperCAmelCase					:		List[str]		=							[
    'small',
    'small-base',
    'medium',
    'medium-base',
    'intermediate',
    'intermediate-base',
    'large',
    'large-base',
    'xlarge',
    'xlarge-base',
]

UpperCAmelCase					:		Optional[Any]		=							{
    'vocab_file': {
        'funnel-transformer/small': 'https://huggingface.co/funnel-transformer/small/resolve/main/vocab.txt',
        'funnel-transformer/small-base': 'https://huggingface.co/funnel-transformer/small-base/resolve/main/vocab.txt',
        'funnel-transformer/medium': 'https://huggingface.co/funnel-transformer/medium/resolve/main/vocab.txt',
        'funnel-transformer/medium-base': (
            'https://huggingface.co/funnel-transformer/medium-base/resolve/main/vocab.txt'
        ),
        'funnel-transformer/intermediate': (
            'https://huggingface.co/funnel-transformer/intermediate/resolve/main/vocab.txt'
        ),
        'funnel-transformer/intermediate-base': (
            'https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/vocab.txt'
        ),
        'funnel-transformer/large': 'https://huggingface.co/funnel-transformer/large/resolve/main/vocab.txt',
        'funnel-transformer/large-base': 'https://huggingface.co/funnel-transformer/large-base/resolve/main/vocab.txt',
        'funnel-transformer/xlarge': 'https://huggingface.co/funnel-transformer/xlarge/resolve/main/vocab.txt',
        'funnel-transformer/xlarge-base': (
            'https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/vocab.txt'
        ),
    },
    'tokenizer_file': {
        'funnel-transformer/small': 'https://huggingface.co/funnel-transformer/small/resolve/main/tokenizer.json',
        'funnel-transformer/small-base': (
            'https://huggingface.co/funnel-transformer/small-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/medium': 'https://huggingface.co/funnel-transformer/medium/resolve/main/tokenizer.json',
        'funnel-transformer/medium-base': (
            'https://huggingface.co/funnel-transformer/medium-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/intermediate': (
            'https://huggingface.co/funnel-transformer/intermediate/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/intermediate-base': (
            'https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/large': 'https://huggingface.co/funnel-transformer/large/resolve/main/tokenizer.json',
        'funnel-transformer/large-base': (
            'https://huggingface.co/funnel-transformer/large-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/xlarge': 'https://huggingface.co/funnel-transformer/xlarge/resolve/main/tokenizer.json',
        'funnel-transformer/xlarge-base': (
            'https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/tokenizer.json'
        ),
    },
}
UpperCAmelCase					:		Tuple		=							{f"""funnel-transformer/{name}""": 5_1_2 for name in _model_names}
UpperCAmelCase					:		int		=							{f"""funnel-transformer/{name}""": {'do_lower_case': True} for name in _model_names}





class lowerCamelCase						(lowerCAmelCase__					):
  _lowercase  :	Any       					=				VOCAB_FILES_NAMES
  _lowercase  :	Optional[Any]       					=				PRETRAINED_VOCAB_FILES_MAP
  _lowercase  :	str       					=				PRETRAINED_INIT_CONFIGURATION
  _lowercase  :	List[Any]       					=				FunnelTokenizer
  _lowercase  :	Optional[Any]       					=				PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
  _lowercase  :	int       					=				2







  def __init__(		self     ,     lowercase__=None     ,     lowercase__=None     ,     lowercase__=True     ,     lowercase__="<unk>"     ,     lowercase__="<sep>"     ,     lowercase__="<pad>"     ,     lowercase__="<cls>"     ,     lowercase__="<mask>"     ,     lowercase__="<s>"     ,     lowercase__="</s>"     ,     lowercase__=True     ,     lowercase__=True     ,     lowercase__=None     ,     lowercase__="##"     ,     **lowercase__     ,     )		->						Optional[int]:






        """simple docstring"""





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

        _snake_case		:	int					     =     json.loads(self.backend_tokenizer.normalizer.__getstate__()		)
        if (
            normalizer_state.get('''lowercase'''     ,     _lowerCamelCase		) != do_lower_case
            or normalizer_state.get('''strip_accents'''     ,     _lowerCamelCase		) != strip_accents
            or normalizer_state.get('''handle_chinese_chars'''     ,     _lowerCamelCase		) != tokenize_chinese_chars
        ):
              _snake_case		:	str					     =     getattr(_lowerCamelCase     ,     normalizer_state.pop('''type'''		)		)
              _snake_case		:	List[str]					     =     do_lower_case
              _snake_case		:	Any					     =     strip_accents
              _snake_case		:	Dict					     =     tokenize_chinese_chars
              _snake_case		:	str					     =     normalizer_class(**_lowerCamelCase		)

        _snake_case		:	Dict					     =     do_lower_case







  def 				UpperCAmelCase_				(		self     ,     lowercase__     ,     lowercase__=None		)		->						int:






        """simple docstring"""





        _snake_case		:	List[str]					     =     [self.cls_token_id] + token_ids_a + [self.sep_token_id]

        if token_ids_a:
              output += token_ids_a + [self.sep_token_id]

        return output







  def 				UpperCAmelCase_				(		self     ,     lowercase__     ,     lowercase__ = None		)		->						List[int]:






        """simple docstring"""





        _snake_case		:	Dict					     =     [self.sep_token_id]
        _snake_case		:	Optional[Any]					     =     [self.cls_token_id]
        if token_ids_a is None:
              return len(cls		) * [self.cls_token_type_id] + len(token_ids_a + sep		) * [0]
        return len(cls		) * [self.cls_token_type_id] + len(token_ids_a + sep		) * [0] + len(token_ids_a + sep		) * [1]







  def 				UpperCAmelCase_				(		self     ,     lowercase__     ,     lowercase__ = None		)		->						Tuple[str]:






        """simple docstring"""





        _snake_case		:	Optional[int]					     =     self._tokenizer.model.save(_lowerCamelCase     ,     name=_lowerCamelCase		)
        return tuple(_lowerCamelCase		)









'''simple docstring'''

def    _a    (							lowerCAmelCase_	):





      """simple docstring"""



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

            return sequence[n]




def    _a    (							lowerCAmelCase_	):





      """simple docstring"""



      _snake_case		:	Optional[int]					     =     0
      _snake_case		:	int					     =     2

      while digits < n:
            index += 1
            _snake_case		:	Tuple					     =     len(str(fibonacci(lowerCAmelCase_	)	)	)

      return index




def    _a    (							lowerCAmelCase_ = 1_000	):





      """simple docstring"""



      return fibonacci_digits_index(lowerCAmelCase_	)


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


