





import copy
from typing import TYPE_CHECKING, Any, Mapping, Optional, OrderedDict

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ..auto.configuration_auto import AutoConfig


if TYPE_CHECKING:
  from ... import PreTrainedTokenizerBase, TensorType

_A					:				Dict				=			logging.get_logger(__name__)



class 					__snake_case	(  __SCREAMING_SNAKE_CASE    ):


    '''simple docstring'''







    lowerCamelCase__    :		Optional[Any]				=	"""vision-encoder-decoder"""
    lowerCamelCase__    :		Union[str, Any]				=	True



    def __init__(       self   ,				**A_     ):





        '''simple docstring'''

        super().__init__(**A_     )
        if "encoder" not in kwargs or "decoder" not in kwargs:
            raise ValueError(
                f'''A configuraton of type {self.model_type} cannot be instantiated because '''
                f'''not both `encoder` and `decoder` sub-configurations are passed, but only {kwargs}'''     )

        SCREAMING_SNAKE_CASE__											=			kwargs.pop('''encoder'''     )
        SCREAMING_SNAKE_CASE__											=			encoder_config.pop('''model_type'''     )
        SCREAMING_SNAKE_CASE__											=			kwargs.pop('''decoder'''     )
        SCREAMING_SNAKE_CASE__											=			decoder_config.pop('''model_type'''     )

        SCREAMING_SNAKE_CASE__											=			AutoConfig.for_model(A_   ,				**A_     )
        SCREAMING_SNAKE_CASE__											=			AutoConfig.for_model(A_   ,				**A_     )
        SCREAMING_SNAKE_CASE__											=			True



    @classmethod
    def  lowercase_					(       cls   ,				A_   ,				A_   ,				**A_     ):





        '''simple docstring'''

        logger.info('''Setting `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config'''     )
        SCREAMING_SNAKE_CASE__											=			True
        SCREAMING_SNAKE_CASE__											=			True

        return cls(encoder=encoder_config.to_dict()   ,				decoder=decoder_config.to_dict()   ,				**A_     )




    def  lowercase_					(       self     ):





        '''simple docstring'''

        SCREAMING_SNAKE_CASE__											=			copy.deepcopy(self.__dict__     )
        SCREAMING_SNAKE_CASE__											=			self.encoder.to_dict()
        SCREAMING_SNAKE_CASE__											=			self.decoder.to_dict()
        SCREAMING_SNAKE_CASE__											=			self.__class__.model_type
        return output





class 					__snake_case	(  __SCREAMING_SNAKE_CASE    ):


    '''simple docstring'''







    lowerCamelCase__    :		int				=	version.parse("""1.11"""    )



    @property
    def  lowercase_					(       self     ):





        '''simple docstring'''

        return OrderedDict(
            [
                ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
            ]     )



    @property
    def  lowercase_					(       self     ):





        '''simple docstring'''

        return 1E-4




    @property
    def  lowercase_					(       self     ):





        '''simple docstring'''

        return OrderedDict({'''last_hidden_state''': {0: '''batch''', 1: '''encoder_sequence'''}}     )





class 					__snake_case	(  __SCREAMING_SNAKE_CASE    ):


    '''simple docstring'''







    @property
    def  lowercase_					(       self     ):





        '''simple docstring'''

        SCREAMING_SNAKE_CASE__											=			OrderedDict()
        SCREAMING_SNAKE_CASE__											=			{0: '''batch''', 1: '''past_decoder_sequence + sequence'''}
        SCREAMING_SNAKE_CASE__											=			{0: '''batch''', 1: '''past_decoder_sequence + sequence'''}
        SCREAMING_SNAKE_CASE__											=			{0: '''batch''', 1: '''encoder_sequence'''}

        return common_inputs




    def  lowercase_					(       self   ,				A_   ,				A_ = -1   ,				A_ = -1   ,				A_ = False   ,				A_ = None   ,				):





        '''simple docstring'''

        import torch

        SCREAMING_SNAKE_CASE__											=			OrderedDict()

        SCREAMING_SNAKE_CASE__											=			super().generate_dummy_inputs(
            A_   ,				batch_size=A_   ,				seq_length=A_   ,				is_pair=A_   ,				framework=A_     )

        SCREAMING_SNAKE_CASE__				,		SCREAMING_SNAKE_CASE__											=			dummy_input['''input_ids'''].shape
        SCREAMING_SNAKE_CASE__											=			(batch, encoder_sequence, self._config.encoder_hidden_size)
        SCREAMING_SNAKE_CASE__											=			dummy_input.pop('''input_ids'''     )
        SCREAMING_SNAKE_CASE__											=			dummy_input.pop('''attention_mask'''     )
        SCREAMING_SNAKE_CASE__											=			torch.zeros(A_     )

        return common_inputs





class 					__snake_case	(  __SCREAMING_SNAKE_CASE    ):


    '''simple docstring'''







    @property
    def  lowercase_					(       self     ):





        '''simple docstring'''

        pass



    def  lowercase_					(       self   ,				A_     ):





        '''simple docstring'''

        return VisionEncoderDecoderEncoderOnnxConfig(A_     )




    def  lowercase_					(       self   ,				A_   ,				A_   ,				A_ = "default"     ):





        '''simple docstring'''

        SCREAMING_SNAKE_CASE__											=			encoder_config.hidden_size
        return VisionEncoderDecoderDecoderOnnxConfig(A_   ,				A_     )






'''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())))

