


'''simple docstring'''




import copy
import os
from typing import Union

from ...configuration_utils import PretrainedConfig
from ...models.auto.modeling_auto import MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
from ...utils import logging
from ..auto import CONFIG_MAPPING


_a   :   List[Any]												=   logging.get_logger(__name__)

_a   :   str												=   {
    "Salesforce/instruct-blip-flan-t5": "https://huggingface.co/Salesforce/instruct-blip-flan-t5/resolve/main/config.json",
}




class 			_lowercase (	__lowercase							):
   _SCREAMING_SNAKE_CASE  :  Any          =	"instructblip_vision_model"
   def __init__(						self       :      int       ,   SCREAMING_SNAKE_CASE_       :      Optional[Any]=1408       ,   SCREAMING_SNAKE_CASE_       :      str=6144       ,   SCREAMING_SNAKE_CASE_       :      List[Any]=39       ,   SCREAMING_SNAKE_CASE_       :      List[str]=16       ,   SCREAMING_SNAKE_CASE_       :      Optional[int]=224       ,   SCREAMING_SNAKE_CASE_       :      List[str]=14       ,   SCREAMING_SNAKE_CASE_       :      Dict="gelu"       ,   SCREAMING_SNAKE_CASE_       :      Any=1e-6       ,   SCREAMING_SNAKE_CASE_       :      Optional[Any]=0.0       ,   SCREAMING_SNAKE_CASE_       :      Any=1e-10       ,   SCREAMING_SNAKE_CASE_       :      Any=True       ,   **SCREAMING_SNAKE_CASE_       :      List[Any]       ,   ) ->							int:
        super().__init__(**SCREAMING_SNAKE_CASE_      )

        __snake_case           =						hidden_size
        __snake_case           =						intermediate_size
        __snake_case           =						num_hidden_layers
        __snake_case           =						num_attention_heads
        __snake_case           =						patch_size
        __snake_case           =						image_size
        __snake_case           =						initializer_range
        __snake_case           =						attention_dropout
        __snake_case           =						layer_norm_eps
        __snake_case           =						hidden_act
        __snake_case           =						qkv_bias





   @classmethod
   def a  (						cls       :      Any       ,   SCREAMING_SNAKE_CASE_       :      Union[str, os.PathLike]       ,   **SCREAMING_SNAKE_CASE_       :      List[str]      ) ->							"PretrainedConfig":
        cls._set_token_in_kwargs(SCREAMING_SNAKE_CASE_      )

        __snake_case      ,       __snake_case           =						cls.get_config_dict(SCREAMING_SNAKE_CASE_       ,   **SCREAMING_SNAKE_CASE_      )

        # get the vision config dict if we are loading from InstructBlipConfig
        if config_dict.get('model_type'      ) == "instructblip":
             __snake_case           =						config_dict['vision_config']

        if "model_type" in config_dict and hasattr(cls       ,   'model_type'      ) and config_dict["model_type"] != cls.model_type:
             logger.warning(
                 f'You are using a model of type {config_dict["model_type"]} to instantiate a model of type '
                 f'{cls.model_type}. This is not supported for all configurations of models and can yield errors.'      )

        return cls.from_dict(SCREAMING_SNAKE_CASE_       ,   **SCREAMING_SNAKE_CASE_      )




class 			_lowercase (	__lowercase							):
   _SCREAMING_SNAKE_CASE  :  Union[str, Any]          =	"instructblip_qformer"
   def __init__(						self       :      List[str]       ,   SCREAMING_SNAKE_CASE_       :      List[Any]=3_0522       ,   SCREAMING_SNAKE_CASE_       :      str=768       ,   SCREAMING_SNAKE_CASE_       :      List[str]=12       ,   SCREAMING_SNAKE_CASE_       :      Optional[Any]=12       ,   SCREAMING_SNAKE_CASE_       :      Dict=3072       ,   SCREAMING_SNAKE_CASE_       :      Dict="gelu"       ,   SCREAMING_SNAKE_CASE_       :      int=0.1       ,   SCREAMING_SNAKE_CASE_       :      List[Any]=0.1       ,   SCREAMING_SNAKE_CASE_       :      List[str]=512       ,   SCREAMING_SNAKE_CASE_       :      Optional[int]=0.0_2       ,   SCREAMING_SNAKE_CASE_       :      Union[str, Any]=1e-12       ,   SCREAMING_SNAKE_CASE_       :      int=0       ,   SCREAMING_SNAKE_CASE_       :      int="absolute"       ,   SCREAMING_SNAKE_CASE_       :      Tuple=2       ,   SCREAMING_SNAKE_CASE_       :      str=1408       ,   **SCREAMING_SNAKE_CASE_       :      List[str]       ,   ) ->							Any:
        super().__init__(pad_token_id=SCREAMING_SNAKE_CASE_       ,   **SCREAMING_SNAKE_CASE_      )

        __snake_case           =						vocab_size
        __snake_case           =						hidden_size
        __snake_case           =						num_hidden_layers
        __snake_case           =						num_attention_heads
        __snake_case           =						hidden_act
        __snake_case           =						intermediate_size
        __snake_case           =						hidden_dropout_prob
        __snake_case           =						attention_probs_dropout_prob
        __snake_case           =						max_position_embeddings
        __snake_case           =						initializer_range
        __snake_case           =						layer_norm_eps
        __snake_case           =						position_embedding_type
        __snake_case           =						cross_attention_frequency
        __snake_case           =						encoder_hidden_size





   @classmethod
   def a  (						cls       :      List[Any]       ,   SCREAMING_SNAKE_CASE_       :      Union[str, os.PathLike]       ,   **SCREAMING_SNAKE_CASE_       :      Dict      ) ->							"PretrainedConfig":
        cls._set_token_in_kwargs(SCREAMING_SNAKE_CASE_      )

        __snake_case      ,       __snake_case           =						cls.get_config_dict(SCREAMING_SNAKE_CASE_       ,   **SCREAMING_SNAKE_CASE_      )

        # get the qformer config dict if we are loading from InstructBlipConfig
        if config_dict.get('model_type'      ) == "instructblip":
             __snake_case           =						config_dict['qformer_config']

        if "model_type" in config_dict and hasattr(cls       ,   'model_type'      ) and config_dict["model_type"] != cls.model_type:
             logger.warning(
                 f'You are using a model of type {config_dict["model_type"]} to instantiate a model of type '
                 f'{cls.model_type}. This is not supported for all configurations of models and can yield errors.'      )

        return cls.from_dict(SCREAMING_SNAKE_CASE_       ,   **SCREAMING_SNAKE_CASE_      )




class 			_lowercase (	__lowercase							):
   _SCREAMING_SNAKE_CASE  :  Dict          =	"instructblip"
   _SCREAMING_SNAKE_CASE  :  str          =	True
   def __init__(						self       :      Optional[int]       ,   SCREAMING_SNAKE_CASE_       :      Optional[Any]=None       ,   SCREAMING_SNAKE_CASE_       :      str=None       ,   SCREAMING_SNAKE_CASE_       :      List[str]=None       ,   SCREAMING_SNAKE_CASE_       :      List[str]=32       ,   **SCREAMING_SNAKE_CASE_       :      str      ) ->							int:
        super().__init__(**SCREAMING_SNAKE_CASE_      )

        if vision_config is None:
             __snake_case           =						{}
             logger.info('vision_config is None. initializing the InstructBlipVisionConfig with default values.'      )

        if qformer_config is None:
             __snake_case           =						{}
             logger.info('qformer_config is None. Initializing the InstructBlipQFormerConfig with default values.'      )

        if text_config is None:
             __snake_case           =						{}
             logger.info('text_config is None. Initializing the text config with default values (`OPTConfig`).'      )

        __snake_case           =						InstructBlipVisionConfig(**SCREAMING_SNAKE_CASE_      )
        __snake_case           =						InstructBlipQFormerConfig(**SCREAMING_SNAKE_CASE_      )
        __snake_case           =						text_config['model_type'] if 'model_type' in text_config else 'opt'
        __snake_case           =						CONFIG_MAPPING[text_model_type](**SCREAMING_SNAKE_CASE_      )

        __snake_case           =						self.text_config.tie_word_embeddings
        __snake_case           =						self.text_config.is_encoder_decoder

        __snake_case           =						num_query_tokens
        __snake_case           =						self.vision_config.hidden_size
        __snake_case           =						self.text_config.model_type in MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
        __snake_case           =						1.0
        __snake_case           =						0.0_2
   @classmethod
   def a  (						cls       :      Union[str, Any]       ,   SCREAMING_SNAKE_CASE_       :      InstructBlipVisionConfig       ,   SCREAMING_SNAKE_CASE_       :      InstructBlipQFormerConfig       ,   SCREAMING_SNAKE_CASE_       :      PretrainedConfig       ,   **SCREAMING_SNAKE_CASE_       :      Tuple       ,   ) ->							Optional[Any]:
        return cls(
            vision_config=vision_config.to_dict()       ,   qformer_config=qformer_config.to_dict()       ,   text_config=text_config.to_dict()       ,   **SCREAMING_SNAKE_CASE_       ,   )





   def a  (						self       :      Optional[int]      ) ->							Any:
        __snake_case           =						copy.deepcopy(self.__dict__      )
        __snake_case           =						self.vision_config.to_dict()
        __snake_case           =						self.qformer_config.to_dict()
        __snake_case           =						self.text_config.to_dict()
        __snake_case           =						self.__class__.model_type
        return output











def 							__snake_case							(    )				->						int:
    return 1


def 							__snake_case							(    lowerCAmelCase_	)				->						int:
    return 0 if x < 0 else two_pence(x - 2	) + one_pence()


def 							__snake_case							(    lowerCAmelCase_	)				->						int:
    return 0 if x < 0 else five_pence(x - 5	) + two_pence(lowerCAmelCase_	)


def 							__snake_case							(    lowerCAmelCase_	)				->						int:
    return 0 if x < 0 else ten_pence(x - 1_0	) + five_pence(lowerCAmelCase_	)


def 							__snake_case							(    lowerCAmelCase_	)				->						int:
    return 0 if x < 0 else twenty_pence(x - 2_0	) + ten_pence(lowerCAmelCase_	)


def 							__snake_case							(    lowerCAmelCase_	)				->						int:
    return 0 if x < 0 else fifty_pence(x - 5_0	) + twenty_pence(lowerCAmelCase_	)


def 							__snake_case							(    lowerCAmelCase_	)				->						int:
    return 0 if x < 0 else one_pound(x - 1_0_0	) + fifty_pence(lowerCAmelCase_	)


def 							__snake_case							(    lowerCAmelCase_	)				->						int:
    return 0 if x < 0 else two_pound(x - 2_0_0	) + one_pound(lowerCAmelCase_	)


def 							__snake_case							(    lowerCAmelCase_ = 2_0_0	)				->						int:
    return two_pound(lowerCAmelCase_	)


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