from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


UpperCAmelCase				 =   logging.get_logger(__name__)

UpperCAmelCase				 =   {
    """apple/mobilevit-small""": """https://huggingface.co/apple/mobilevit-small/resolve/main/config.json""",
    """apple/mobilevit-x-small""": """https://huggingface.co/apple/mobilevit-x-small/resolve/main/config.json""",
    """apple/mobilevit-xx-small""": """https://huggingface.co/apple/mobilevit-xx-small/resolve/main/config.json""",
    """apple/deeplabv3-mobilevit-small""": (
        """https://huggingface.co/apple/deeplabv3-mobilevit-small/resolve/main/config.json"""
    ),
    """apple/deeplabv3-mobilevit-x-small""": (
        """https://huggingface.co/apple/deeplabv3-mobilevit-x-small/resolve/main/config.json"""
    ),
    """apple/deeplabv3-mobilevit-xx-small""": (
        """https://huggingface.co/apple/deeplabv3-mobilevit-xx-small/resolve/main/config.json"""
    ),
    # See all MobileViT models at https://huggingface.co/models?filter=mobilevit
}






class 				_SCREAMING_SNAKE_CASE( snake_case__						):
   UpperCamelCase_					:    Dict			      = 'mobilevit'
   def __init__(     self				,  lowerCAmelCase_=3				,  lowerCAmelCase_=2_56				,  lowerCAmelCase_=2				,  lowerCAmelCase_=[1_44, 1_92, 2_40]				,  lowerCAmelCase_=[16, 32, 64, 96, 1_28, 1_60, 6_40]				,  lowerCAmelCase_=4				,  lowerCAmelCase_=2.0				,  lowerCAmelCase_=4.0				,  lowerCAmelCase_="silu"				,  lowerCAmelCase_=3				,  lowerCAmelCase_=32				,  lowerCAmelCase_=0.1				,  lowerCAmelCase_=0.0				,  lowerCAmelCase_=0.1				,  lowerCAmelCase_=0.02				,  lowerCAmelCase_=1e-5				,  lowerCAmelCase_=True				,  lowerCAmelCase_=2_56				,  lowerCAmelCase_=[6, 12, 18]				,  lowerCAmelCase_=0.1				,  lowerCAmelCase_=2_55				,  **lowerCAmelCase_				,  )						->Dict:
        super().__init__(**lowerCAmelCase_     )

        a	:     Dict						      =    num_channels
        a	:     Optional[int]						      =    image_size
        a	:     int						      =    patch_size
        a	:     int						      =    hidden_sizes
        a	:     Union[str, Any]						      =    neck_hidden_sizes
        a	:     Union[str, Any]						      =    num_attention_heads
        a	:     Any						      =    mlp_ratio
        a	:     Union[str, Any]						      =    expand_ratio
        a	:     List[Any]						      =    hidden_act
        a	:     Any						      =    conv_kernel_size
        a	:     Optional[Any]						      =    output_stride
        a	:     Tuple						      =    hidden_dropout_prob
        a	:     Any						      =    attention_probs_dropout_prob
        a	:     Any						      =    classifier_dropout_prob
        a	:     Optional[int]						      =    initializer_range
        a	:     Optional[int]						      =    layer_norm_eps
        a	:     Optional[Any]						      =    qkv_bias

        # decode head attributes for semantic segmentation
        a	:     int						      =    aspp_out_channels
        a	:     List[Any]						      =    atrous_rates
        a	:     int						      =    aspp_dropout_prob
        a	:     str						      =    semantic_loss_ignore_index






class 				_SCREAMING_SNAKE_CASE( snake_case__						):
   UpperCamelCase_					:    str			      = version.parse('1.11'						)
   @property
   def _lowercase(     self     )						->Mapping[str, Mapping[int, str]]:
        return OrderedDict([('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''})]     )
   @property
   def _lowercase(     self     )						->Mapping[str, Mapping[int, str]]:
        if self.task == "image-classification":
             return OrderedDict([('''logits''', {0: '''batch'''})]     )
        else:
             return OrderedDict([('''last_hidden_state''', {0: '''batch'''}), ('''pooler_output''', {0: '''batch'''})]     )


   @property
   def _lowercase(     self     )						->float:
        return 1e-4
import math







def 						UpperCAmelCase							(		lowerCAmelCase_							)						->						int:
     return sum(int(lowerCAmelCase_							) for digit in str(lowerCAmelCase_							)							)







def 						UpperCAmelCase							(		lowerCAmelCase_ = 3_0							)						->						int:
     a	:     Optional[int]						      =    []
     for digit in range(2    ,   1_0_0							):
          for power in range(2    ,   1_0_0							):
               a	:     List[str]						      =    int(math.pow(lowerCAmelCase_    ,   lowerCAmelCase_							)							)
               if digit == digit_sum(lowerCAmelCase_							):
                    digit_to_powers.append(lowerCAmelCase_							)

     digit_to_powers.sort()
     return digit_to_powers[n - 1]


if __name__ == "__main__":
  print(solution())