






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


UpperCamelCase							=logging.get_logger(__name__)

UpperCamelCase							={
    "salesforce/blip2-opt-2.7b": "https://huggingface.co/salesforce/blip2-opt-2.7b/resolve/main/config.json",
}




class     A    (      SCREAMING_SNAKE_CASE__						):






 """simple docstring"""





 __a			:						Tuple      =						'''blip_2_vision_model'''
 def __init__(							self			,     __lowerCAmelCase=14_08			,     __lowerCAmelCase=61_44			,     __lowerCAmelCase=39			,     __lowerCAmelCase=16			,     __lowerCAmelCase=2_24			,     __lowerCAmelCase=14			,     __lowerCAmelCase="gelu"			,     __lowerCAmelCase=0.0_00_01			,     __lowerCAmelCase=0.0			,     __lowerCAmelCase=1E-10			,     __lowerCAmelCase=True			,     **__lowerCAmelCase			,     ):
       super().__init__(**__lowerCAmelCase )

       UpperCamelCase_				:   Tuple					    =							hidden_size
       UpperCamelCase_				:   Union[str, Any]					    =							intermediate_size
       UpperCamelCase_				:   Optional[Any]					    =							num_hidden_layers
       UpperCamelCase_				:   str					    =							num_attention_heads
       UpperCamelCase_				:   List[str]					    =							patch_size
       UpperCamelCase_				:   str					    =							image_size
       UpperCamelCase_				:   Optional[int]					    =							initializer_range
       UpperCamelCase_				:   int					    =							attention_dropout
       UpperCamelCase_				:   List[Any]					    =							layer_norm_eps
       UpperCamelCase_				:   int					    =							hidden_act
       UpperCamelCase_				:   int					    =							qkv_bias





 @classmethod
 def   _UpperCAmelCase       (							cls			,     __lowerCAmelCase			,     **__lowerCAmelCase ):
       cls._set_token_in_kwargs(__lowerCAmelCase )

       UpperCamelCase_    ,			UpperCamelCase_				:   Optional[Any]					    =							cls.get_config_dict(__lowerCAmelCase			,     **__lowerCAmelCase )

       # get the vision config dict if we are loading from Blip2Config
       if config_dict.get("""model_type""" ) == "blip-2":
             UpperCamelCase_				:   Tuple					    =							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(__lowerCAmelCase			,     **__lowerCAmelCase )






class     A    (      SCREAMING_SNAKE_CASE__						):






 """simple docstring"""





 __a			:						List[Any]      =						'''blip_2_qformer'''
 def __init__(							self			,     __lowerCAmelCase=3_05_22			,     __lowerCAmelCase=7_68			,     __lowerCAmelCase=12			,     __lowerCAmelCase=12			,     __lowerCAmelCase=30_72			,     __lowerCAmelCase="gelu"			,     __lowerCAmelCase=0.1			,     __lowerCAmelCase=0.1			,     __lowerCAmelCase=5_12			,     __lowerCAmelCase=0.02			,     __lowerCAmelCase=1E-12			,     __lowerCAmelCase=0			,     __lowerCAmelCase="absolute"			,     __lowerCAmelCase=2			,     __lowerCAmelCase=14_08			,     **__lowerCAmelCase			,     ):
       super().__init__(pad_token_id=__lowerCAmelCase			,     **__lowerCAmelCase )

       UpperCamelCase_				:   Dict					    =							vocab_size
       UpperCamelCase_				:   List[Any]					    =							hidden_size
       UpperCamelCase_				:   Union[str, Any]					    =							num_hidden_layers
       UpperCamelCase_				:   int					    =							num_attention_heads
       UpperCamelCase_				:   Tuple					    =							hidden_act
       UpperCamelCase_				:   List[Any]					    =							intermediate_size
       UpperCamelCase_				:   Tuple					    =							hidden_dropout_prob
       UpperCamelCase_				:   int					    =							attention_probs_dropout_prob
       UpperCamelCase_				:   Dict					    =							max_position_embeddings
       UpperCamelCase_				:   Union[str, Any]					    =							initializer_range
       UpperCamelCase_				:   Optional[Any]					    =							layer_norm_eps
       UpperCamelCase_				:   str					    =							position_embedding_type
       UpperCamelCase_				:   List[str]					    =							cross_attention_frequency
       UpperCamelCase_				:   Union[str, Any]					    =							encoder_hidden_size





 @classmethod
 def   _UpperCAmelCase       (							cls			,     __lowerCAmelCase			,     **__lowerCAmelCase ):
       cls._set_token_in_kwargs(__lowerCAmelCase )

       UpperCamelCase_    ,			UpperCamelCase_				:   List[Any]					    =							cls.get_config_dict(__lowerCAmelCase			,     **__lowerCAmelCase )

       # get the qformer config dict if we are loading from Blip2Config
       if config_dict.get("""model_type""" ) == "blip-2":
             UpperCamelCase_				:   int					    =							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(__lowerCAmelCase			,     **__lowerCAmelCase )






class     A    (      SCREAMING_SNAKE_CASE__						):






 """simple docstring"""





 __a			:						List[str]      =						'''blip-2'''
 __a			:						Optional[Any]      =						True
 def __init__(							self			,     __lowerCAmelCase=None			,     __lowerCAmelCase=None			,     __lowerCAmelCase=None			,     __lowerCAmelCase=32			,     **__lowerCAmelCase ):
       super().__init__(**__lowerCAmelCase )

       if vision_config is None:
             UpperCamelCase_				:   Optional[int]					    =							{}
             logger.info("""vision_config is None. initializing the Blip2VisionConfig with default values.""" )

       if qformer_config is None:
             UpperCamelCase_				:   Optional[Any]					    =							{}
             logger.info("""qformer_config is None. Initializing the Blip2QFormerConfig with default values.""" )

       if text_config is None:
             UpperCamelCase_				:   Optional[int]					    =							{}
             logger.info("""text_config is None. Initializing the text config with default values (`OPTConfig`).""" )

       UpperCamelCase_				:   Optional[int]					    =							BlipaVisionConfig(**__lowerCAmelCase )
       UpperCamelCase_				:   Tuple					    =							BlipaQFormerConfig(**__lowerCAmelCase )
       UpperCamelCase_				:   Any					    =							text_config["""model_type"""] if """model_type""" in text_config else """opt"""
       UpperCamelCase_				:   List[str]					    =							CONFIG_MAPPING[text_model_type](**__lowerCAmelCase )

       UpperCamelCase_				:   List[Any]					    =							self.text_config.tie_word_embeddings
       UpperCamelCase_				:   Union[str, Any]					    =							self.text_config.is_encoder_decoder

       UpperCamelCase_				:   str					    =							num_query_tokens
       UpperCamelCase_				:   Optional[int]					    =							self.vision_config.hidden_size
       UpperCamelCase_				:   str					    =							self.text_config.model_type in MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
       UpperCamelCase_				:   Union[str, Any]					    =							1.0
       UpperCamelCase_				:   int					    =							0.02
 @classmethod
 def   _UpperCAmelCase       (							cls			,     __lowerCAmelCase			,     __lowerCAmelCase			,     __lowerCAmelCase			,     **__lowerCAmelCase			,     ):
       return cls(
           vision_config=vision_config.to_dict()			,     qformer_config=qformer_config.to_dict()			,     text_config=text_config.to_dict()			,     **__lowerCAmelCase			,     )





 def   _UpperCAmelCase       (							self ):
       UpperCamelCase_				:   Any					    =							copy.deepcopy(self.__dict__ )
       UpperCamelCase_				:   List[str]					    =							self.vision_config.to_dict()
       UpperCamelCase_				:   Any					    =							self.qformer_config.to_dict()
       UpperCamelCase_				:   Optional[Any]					    =							self.text_config.to_dict()
       UpperCamelCase_				:   Union[str, Any]					    =							self.__class__.model_type
       return output














'''simple docstring'''

def 							snake_case					(     )       ->				int:





      """simple docstring"""

      return 1



def 							snake_case					(     a_							: int	)       ->				int:





      """simple docstring"""

      return 0 if x < 0 else two_pence(x - 2	) + one_pence()



def 							snake_case					(     a_							: int	)       ->				int:





      """simple docstring"""

      return 0 if x < 0 else five_pence(x - 5	) + two_pence(a_	)



def 							snake_case					(     a_							: int	)       ->				int:





      """simple docstring"""

      return 0 if x < 0 else ten_pence(x - 10	) + five_pence(a_	)



def 							snake_case					(     a_							: int	)       ->				int:





      """simple docstring"""

      return 0 if x < 0 else twenty_pence(x - 20	) + ten_pence(a_	)



def 							snake_case					(     a_							: int	)       ->				int:





      """simple docstring"""

      return 0 if x < 0 else fifty_pence(x - 50	) + twenty_pence(a_	)



def 							snake_case					(     a_							: int	)       ->				int:





      """simple docstring"""

      return 0 if x < 0 else one_pound(x - 100	) + fifty_pence(a_	)



def 							snake_case					(     a_							: int	)       ->				int:





      """simple docstring"""

      return 0 if x < 0 else two_pound(x - 200	) + one_pound(a_	)



def 							snake_case					(     a_							: int = 200	)       ->				int:





      """simple docstring"""

      return two_pound(a_	)


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






