




'''simple docstring'''

import json
from typing import Dict, List, Optional, Tuple, Union

from tokenizers import pre_tokenizers, processors

from ...tokenization_utils_base import AddedToken, BatchEncoding, EncodedInput
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import PaddingStrategy, logging
from .tokenization_led import LEDTokenizer


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


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

a    :							Any										=    {
    'vocab_file': {
        'allenai/led-base-16384': 'https://huggingface.co/allenai/led-base-16384/resolve/main/vocab.json',
    },
    'merges_file': {
        'allenai/led-base-16384': 'https://huggingface.co/allenai/led-base-16384/resolve/main/merges.txt',
    },
    'tokenizer_file': {
        'allenai/led-base-16384': 'https://huggingface.co/allenai/led-base-16384/resolve/main/tokenizer.json',
    },
}

a    :							Tuple										=    {
    'allenai/led-base-16384': 1_6384,
}






class 		a							(  _lowerCamelCase	):
				snake_case_           =						VOCAB_FILES_NAMES
				snake_case_           =						PRETRAINED_VOCAB_FILES_MAP
				snake_case_           =						PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
				snake_case_           =						LEDTokenizer
				snake_case_           =						["input_ids", "attention_mask"]


				def __init__(						self       :   str			,							lowercase_       :   List[str]=None			,							lowercase_       :   List[str]=None			,							lowercase_       :   str=None			,							lowercase_       :   Dict="replace"			,							lowercase_       :   Optional[Any]="<s>"			,							lowercase_       :   List[Any]="</s>"			,							lowercase_       :   Optional[Any]="</s>"			,							lowercase_       :   List[str]="<s>"			,							lowercase_       :   Dict="<unk>"			,							lowercase_       :   Union[str, Any]="<pad>"			,							lowercase_       :   int="<mask>"			,							lowercase_       :   Optional[Any]=False			,							lowercase_       :   Union[str, Any]=True			,							**lowercase_       :   Optional[int]			,							):
									super().__init__(
									    lowercase_			,							lowercase_			,							tokenizer_file=lowercase_			,							errors=lowercase_			,							bos_token=lowercase_			,							eos_token=lowercase_			,							sep_token=lowercase_			,							cls_token=lowercase_			,							unk_token=lowercase_			,							pad_token=lowercase_			,							mask_token=lowercase_			,							add_prefix_space=lowercase_			,							trim_offsets=lowercase_			,							**lowercase_			,							)

									snake_case_		     =							json.loads(self.backend_tokenizer.pre_tokenizer.__getstate__()   )
									if pre_tok_state.get('''add_prefix_space'''			,							lowercase_   ) != add_prefix_space:
														snake_case_		     =							getattr(lowercase_			,							pre_tok_state.pop('''type'''   )   )
														snake_case_		     =							add_prefix_space
														snake_case_		     =							pre_tok_class(**lowercase_   )

									snake_case_		     =							add_prefix_space

									# the pre_tokenizer is already updated in the GPT2TokenizerFast `__init__`
									snake_case_		     =							'''post_processor'''
									snake_case_		     =							getattr(self.backend_tokenizer			,							lowercase_			,							lowercase_   )
									if tokenizer_component_instance:
														snake_case_		     =							json.loads(tokenizer_component_instance.__getstate__()   )

														# The lists 'sep' and 'cls' must be cased in tuples for the object `post_processor_class`
														if "sep" in state:
																			snake_case_		     =							tuple(state['''sep''']   )
														if "cls" in state:
																			snake_case_		     =							tuple(state['''cls''']   )

														snake_case_		     =							False

														if state.get('''add_prefix_space'''			,							lowercase_   ) != add_prefix_space:
																			snake_case_		     =							add_prefix_space
																			snake_case_		     =							True

														if state.get('''trim_offsets'''			,							lowercase_   ) != trim_offsets:
																			snake_case_		     =							trim_offsets
																			snake_case_		     =							True

														if changes_to_apply:
																			snake_case_		     =							getattr(lowercase_			,							state.pop('''type'''   )   )
																			snake_case_		     =							component_class(**lowercase_   )
																			setattr(self.backend_tokenizer			,							lowercase_			,							lowercase_   )


				@property
				# Copied from transformers.models.bart.tokenization_bart_fast.BartTokenizerFast.mask_token with BART->LED
				def     A_					(						self       :   Dict   ):
									if self._mask_token is None:
														if self.verbose:
																			logger.error('''Using mask_token, but it is not set yet.'''   )
														return None
									return str(self._mask_token   )


				@mask_token.setter
				def     A_					(						self       :   Tuple			,							lowercase_       :   Dict   ):
									snake_case_		     =							AddedToken(lowercase_			,							lstrip=lowercase_			,							rstrip=lowercase_   ) if isinstance(lowercase_			,							lowercase_   ) else value
									snake_case_		     =							value


				def     A_					(						self       :   str			,							*lowercase_       :   List[str]			,							**lowercase_       :   Optional[int]   ):
									snake_case_		     =							kwargs.get('''is_split_into_words'''			,							lowercase_   )

									if is_split_into_words and not self.add_prefix_space:
														raise ValueError(
														    F"You need to instantiate {self.__class__.__name__} with add_prefix_space=True "
														    '''to use it with pretokenized inputs.'''   )

									return super()._batch_encode_plus(*lowercase_			,							**lowercase_   )


				def     A_					(						self       :   Any			,							*lowercase_       :   List[Any]			,							**lowercase_       :   List[str]   ):
									snake_case_		     =							kwargs.get('''is_split_into_words'''			,							lowercase_   )

									if is_split_into_words and not self.add_prefix_space:
														raise ValueError(
														    F"You need to instantiate {self.__class__.__name__} with add_prefix_space=True "
														    '''to use it with pretokenized inputs.'''   )

									return super()._encode_plus(*lowercase_			,							**lowercase_   )


				def     A_					(						self       :   Tuple			,							lowercase_       :   str			,							lowercase_       :   Optional[str] = None   ):
									snake_case_		     =							self._tokenizer.model.save(lowercase_			,							name=lowercase_   )
									return tuple(lowercase_   )


				def     A_					(						self       :   int			,							lowercase_       :   Any			,							lowercase_       :   List[Any]=None   ):
									snake_case_		     =							[self.bos_token_id] + token_ids_a + [self.eos_token_id]
									if token_ids_a is None:
														return output

									return output + [self.eos_token_id] + token_ids_a + [self.eos_token_id]


				def     A_					(						self       :   str			,							lowercase_       :   List[int]			,							lowercase_       :   Optional[List[int]] = None   ):
									snake_case_		     =							[self.sep_token_id]
									snake_case_		     =							[self.cls_token_id]

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


				def     A_					(						self       :   str			,							lowercase_       :   Union[Dict[str, EncodedInput], BatchEncoding]			,							lowercase_       :   Optional[int] = None			,							lowercase_       :   PaddingStrategy = PaddingStrategy.DO_NOT_PAD			,							lowercase_       :   Optional[int] = None			,							lowercase_       :   Optional[bool] = None			,							):
									snake_case_		     =							super()._pad(
									    encoded_inputs=lowercase_			,							max_length=lowercase_			,							padding_strategy=lowercase_			,							pad_to_multiple_of=lowercase_			,							return_attention_mask=lowercase_			,							)

									# Load from model defaults
									if return_attention_mask is None:
														snake_case_		     =							'''attention_mask''' in self.model_input_names

									if return_attention_mask and "global_attention_mask" in encoded_inputs:
														snake_case_		     =							encoded_inputs[self.model_input_names[0]]
														# `global_attention_mask` need to have the same length as other (sequential) inputs.
														snake_case_		     =							len(encoded_inputs['''global_attention_mask''']   ) != len(lowercase_   )

														if needs_to_be_padded:
																			snake_case_		     =							len(lowercase_   ) - len(encoded_inputs['''global_attention_mask''']   )

																			if self.padding_side == "right":
																								# Use `-1` since `0` in `global_attention_mask` means `local attention` instead of `not to attend`
																								snake_case_		     =							(
																								    encoded_inputs['''global_attention_mask'''] + [-1] * difference
																								)
																			elif self.padding_side == "left":
																								snake_case_		     =							[-1] * difference + encoded_inputs[
																								    '''global_attention_mask'''
																								]
																			else:
																								raise ValueError('''Invalid padding strategy:''' + str(self.padding_side   )   )

									return encoded_inputs







'''simple docstring'''

from collections.abc import Generator


def 						__magic_name__       (      )						->   Generator[int, None, None]:

					'''simple docstring'''

					snake_case_     ,snake_case_		     =							0, 1
					while True:
										snake_case_     ,snake_case_		     =							b, a + b
										yield b


def 						__magic_name__       (      __UpperCAmelCase = 1000      )						->   int:

					'''simple docstring'''

					snake_case_		     =							1
					snake_case_		     =							fibonacci_generator()
					while len(str(next(__UpperCAmelCase      )      )      ) < n:
										answer += 1
					return answer + 1


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

