"""simple docstring"""




import os
import warnings
from typing import List, Optional

from ...tokenization_utils_base import BatchEncoding
from ...utils import logging
from .configuration_rag import RagConfig


__lowerCAmelCase     :				str    				=    logging.get_logger(__name__)

class    a_   :




					def __init__(						self    :  List[str]	,    snake_case__    :  Dict	,    snake_case__    :  Optional[int]  ):
							lowerCAmelCase__   = question_encoder
							lowerCAmelCase__   = generator
							lowerCAmelCase__   = self.question_encoder




					def     _SCREAMING_SNAKE_CASE    (						self    :  Optional[int]	,    snake_case__    :  str  ):
							if os.path.isfile(snake_case__  ):
									raise ValueError(F"""Provided path ({save_directory}) should be a directory, not a file"""  )
							os.makedirs(snake_case__	,    exist_ok=snake_case__  )
							lowerCAmelCase__   = os.path.join(snake_case__	,    """question_encoder_tokenizer"""  )
							lowerCAmelCase__   = os.path.join(snake_case__	,    """generator_tokenizer"""  )
							self.question_encoder.save_pretrained(snake_case__  )
							self.generator.save_pretrained(snake_case__  )




					@classmethod
					def     _SCREAMING_SNAKE_CASE    (						cls    :  Optional[Any]	,    snake_case__    :  List[str]	,    **snake_case__    :  Any  ):
							# dynamically import AutoTokenizer
							from ..auto.tokenization_auto import AutoTokenizer

							lowerCAmelCase__   = kwargs.pop("""config"""	,    snake_case__  )

							if config is None:
									lowerCAmelCase__   = RagConfig.from_pretrained(snake_case__  )

							lowerCAmelCase__   = AutoTokenizer.from_pretrained(
							    snake_case__	,    config=config.question_encoder	,    subfolder="""question_encoder_tokenizer"""  )
							lowerCAmelCase__   = AutoTokenizer.from_pretrained(
							    snake_case__	,    config=config.generator	,    subfolder="""generator_tokenizer"""  )
							return cls(question_encoder=snake_case__	,    generator=snake_case__  )




					def __call__(						self    :  int	,    *snake_case__    :  List[Any]	,    **snake_case__    :  List[str]  ):
							return self.current_tokenizer(*snake_case__	,    **snake_case__  )




					def     _SCREAMING_SNAKE_CASE    (						self    :  List[Any]	,    *snake_case__    :  Any	,    **snake_case__    :  Union[str, Any]  ):
							return self.generator.batch_decode(*snake_case__	,    **snake_case__  )




					def     _SCREAMING_SNAKE_CASE    (						self    :  Optional[int]	,    *snake_case__    :  Union[str, Any]	,    **snake_case__    :  List[str]  ):
							return self.generator.decode(*snake_case__	,    **snake_case__  )




					def     _SCREAMING_SNAKE_CASE    (						self    :  List[Any]  ):
							lowerCAmelCase__   = self.question_encoder




					def     _SCREAMING_SNAKE_CASE    (						self    :  List[Any]  ):
							lowerCAmelCase__   = self.generator




					def     _SCREAMING_SNAKE_CASE    (						self    :  List[Any]	,    snake_case__    :  List[str]	,    snake_case__    :  Optional[List[str]] = None	,    snake_case__    :  Optional[int] = None	,    snake_case__    :  Optional[int] = None	,    snake_case__    :  str = "longest"	,    snake_case__    :  str = None	,    snake_case__    :  bool = True	,    **snake_case__    :  Optional[int]	,    ):
							warnings.warn(
							    """`prepare_seq2seq_batch` is deprecated and will be removed in version 5 of 🤗 Transformers. Use the """
							    """regular `__call__` method to prepare your inputs and the tokenizer under the `with_target_tokenizer` """
							    """context manager to prepare your targets. See the documentation of your specific tokenizer for more """
							    """details"""	,    snake_case__	,    )
							if max_length is None:
									lowerCAmelCase__   = self.current_tokenizer.model_max_length
							lowerCAmelCase__   = self(
							    snake_case__	,    add_special_tokens=snake_case__	,    return_tensors=snake_case__	,    max_length=snake_case__	,    padding=snake_case__	,    truncation=snake_case__	,    **snake_case__	,    )
							if tgt_texts is None:
									return model_inputs
							# Process tgt_texts
							if max_target_length is None:
									lowerCAmelCase__   = self.current_tokenizer.model_max_length
							lowerCAmelCase__   = self(
							    text_target=snake_case__	,    add_special_tokens=snake_case__	,    return_tensors=snake_case__	,    padding=snake_case__	,    max_length=snake_case__	,    truncation=snake_case__	,    **snake_case__	,    )
							lowerCAmelCase__   = labels["""input_ids"""]
							return model_inputs





"""simple docstring"""




from collections.abc import Generator







def 				_UpperCAmelCase		(							):





		"""simple docstring"""




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







def 				_UpperCAmelCase		(							lowerCamelCase__ = 1000  ):





		"""simple docstring"""




		lowerCAmelCase__   = 1
		lowerCAmelCase__   = fibonacci_generator()
		while len(str(next(lowerCamelCase__  )  )  ) < n:
				answer += 1
		return answer + 1


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




