'''simple docstring'''





import copy
import os
from typing import Union

from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowerCAmelCase  :Optional[int]  				=    logging.get_logger(__name__)

_lowerCAmelCase  :Optional[int]  				=    {
    """Salesforce/blip-vqa-base""": """https://huggingface.co/Salesforce/blip-vqa-base/resolve/main/config.json""",
    """Salesforce/blip-vqa-capfit-large""": (
        """https://huggingface.co/Salesforce/blip-vqa-base-capfit/resolve/main/config.json"""
    ),
    """Salesforce/blip-image-captioning-base""": (
        """https://huggingface.co/Salesforce/blip-image-captioning-base/resolve/main/config.json"""
    ),
    """Salesforce/blip-image-captioning-large""": (
        """https://huggingface.co/Salesforce/blip-image-captioning-large/resolve/main/config.json"""
    ),
    """Salesforce/blip-itm-base-coco""": """https://huggingface.co/Salesforce/blip-itm-base-coco/resolve/main/config.json""",
    """Salesforce/blip-itm-large-coco""": """https://huggingface.co/Salesforce/blip-itm-large-coco/resolve/main/config.json""",
    """Salesforce/blip-itm-base-flikr""": """https://huggingface.co/Salesforce/blip-itm-base-flikr/resolve/main/config.json""",
    """Salesforce/blip-itm-large-flikr""": (
        """https://huggingface.co/Salesforce/blip-itm-large-flikr/resolve/main/config.json"""
    ),
}






class 				UpperCAmelCase (       UpperCamelCase__ ):




    '''simple docstring'''







    snake_case__							:   Union[str, Any]							=						"blip_text_model"






    def __init__(       self    ,							lowercase__=30_524    ,							lowercase__=768    ,							lowercase__=768    ,							lowercase__=3_072    ,							lowercase__=768    ,							lowercase__=12    ,							lowercase__=8    ,							lowercase__=512    ,							lowercase__="gelu"    ,							lowercase__=1E-12    ,							lowercase__=0.0    ,							lowercase__=0.0    ,							lowercase__=0.0_2    ,							lowercase__=30_522    ,							lowercase__=2    ,							lowercase__=0    ,							lowercase__=102    ,							lowercase__=True    ,							lowercase__=True    ,							**lowercase__    ,							)							-> Optional[int]:
         super().__init__(
             pad_token_id=__A    ,							bos_token_id=__A    ,							eos_token_id=__A    ,							sep_token_id=__A    ,							**__A    ,							)

         SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       vocab_size
         SCREAMING_SNAKE_CASE					:			Any    	=       hidden_size
         SCREAMING_SNAKE_CASE					:			Tuple    	=       encoder_hidden_size
         SCREAMING_SNAKE_CASE					:			List[Any]    	=       intermediate_size
         SCREAMING_SNAKE_CASE					:			Dict    	=       projection_dim
         SCREAMING_SNAKE_CASE					:			Optional[int]    	=       hidden_dropout_prob
         SCREAMING_SNAKE_CASE					:			List[str]    	=       num_hidden_layers
         SCREAMING_SNAKE_CASE					:			int    	=       num_attention_heads
         SCREAMING_SNAKE_CASE					:			int    	=       max_position_embeddings
         SCREAMING_SNAKE_CASE					:			List[Any]    	=       layer_norm_eps
         SCREAMING_SNAKE_CASE					:			Tuple    	=       hidden_act
         SCREAMING_SNAKE_CASE					:			List[str]    	=       initializer_range
         SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       attention_probs_dropout_prob
         SCREAMING_SNAKE_CASE					:			int    	=       is_decoder
         SCREAMING_SNAKE_CASE					:			List[Any]    	=       use_cache






    @classmethod
    def       _UpperCamelCase    (       cls    ,							lowercase__    ,							**lowercase__ )							-> "PretrainedConfig":
         cls._set_token_in_kwargs(__A )

         SCREAMING_SNAKE_CASE	,   SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       cls.get_config_dict(__A    ,							**__A )

         # get the text config dict if we are loading from BlipConfig
         if config_dict.get('model_type' ) == "blip":
              SCREAMING_SNAKE_CASE					:			Tuple    	=       config_dict['text_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(__A    ,							**__A )






class 				UpperCAmelCase (       UpperCamelCase__ ):




    '''simple docstring'''







    snake_case__							:   Union[str, Any]							=						"blip_vision_model"






    def __init__(       self    ,							lowercase__=768    ,							lowercase__=3_072    ,							lowercase__=512    ,							lowercase__=12    ,							lowercase__=12    ,							lowercase__=384    ,							lowercase__=16    ,							lowercase__="gelu"    ,							lowercase__=1E-5    ,							lowercase__=0.0    ,							lowercase__=1E-10    ,							**lowercase__    ,							)							-> Optional[int]:
         super().__init__(**__A )

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






    @classmethod
    def       _UpperCamelCase    (       cls    ,							lowercase__    ,							**lowercase__ )							-> "PretrainedConfig":
         cls._set_token_in_kwargs(__A )

         SCREAMING_SNAKE_CASE	,   SCREAMING_SNAKE_CASE					:			str    	=       cls.get_config_dict(__A    ,							**__A )

         # get the vision config dict if we are loading from BlipConfig
         if config_dict.get('model_type' ) == "blip":
              SCREAMING_SNAKE_CASE					:			str    	=       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(__A    ,							**__A )






class 				UpperCAmelCase (       UpperCamelCase__ ):




    '''simple docstring'''







    snake_case__							:   Union[str, Any]							=						"blip"
    snake_case__							:   Union[str, Any]							=						True






    def __init__(       self    ,							lowercase__=None    ,							lowercase__=None    ,							lowercase__=512    ,							lowercase__=2.6_5_9_2    ,							lowercase__=256    ,							**lowercase__    ,							)							-> List[str]:
         super().__init__(**__A )

         if text_config is None:
              SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       {}
              logger.info('`text_config` is `None`. Initializing the `BlipTextConfig` with default values.' )

         if vision_config is None:
              SCREAMING_SNAKE_CASE					:			Dict    	=       {}
              logger.info('`vision_config` is `None`. Initializing the `BlipVisionConfig` with default values.' )

         SCREAMING_SNAKE_CASE					:			str    	=       BlipTextConfig(**__A )
         SCREAMING_SNAKE_CASE					:			List[Any]    	=       BlipVisionConfig(**__A )

         SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       self.vision_config.hidden_size

         SCREAMING_SNAKE_CASE					:			str    	=       projection_dim
         SCREAMING_SNAKE_CASE					:			int    	=       logit_scale_init_value
         SCREAMING_SNAKE_CASE					:			int    	=       1.0
         SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       0.0_2
         SCREAMING_SNAKE_CASE					:			Optional[int]    	=       image_text_hidden_size






    @classmethod
    def       _UpperCamelCase    (       cls    ,							lowercase__    ,							lowercase__    ,							**lowercase__ )							-> List[Any]:
         return cls(text_config=text_config.to_dict()    ,							vision_config=vision_config.to_dict()    ,							**__A )






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

'''simple docstring'''





def     __lowerCAmelCase						(       a_ = 1000		)      ->	int:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       2**power
     SCREAMING_SNAKE_CASE					:			Any    	=       str(a_		)
     SCREAMING_SNAKE_CASE					:			int    	=       list(a_		)
     SCREAMING_SNAKE_CASE					:			Any    	=       0

     for i in list_num:
          sum_of_num += int(a_		)

     return sum_of_num


if __name__ == "__main__":
 _lowerCAmelCase  :Tuple  				=    int(input("""Enter the power of 2: """).strip())
 print("""2 ^ """, power, """ = """, 2**power)
 _lowerCAmelCase  :int  				=    solution(power)
 print("""Sum of the digits is: """, result)



