"""simple docstring"""
SCREAMING_SNAKE_CASE__   :      List[Any]							=[sum(int(c, 10) ** 2 for c in i.__str__()) for i in range(10_0000)]



def 					UpperCamelCase					(       SCREAMING_SNAKE_CASE_ )      ->int:
    _lowerCamelCase	: int       =       0
    while number:
        # Increased Speed Slightly by checking every 5 digits together.
        sum_of_digits_squared += DIGITS_SQUARED[number % 10_0000]
        number //= 10_0000

    return sum_of_digits_squared


# There are 2 Chains made,
# One ends with 89 with the chain member 58 being the one which when declared first,
# there will be the least number of iterations for all the members to be checked.

# The other one ends with 1 and has only one element 1.

# So 58 and 1 are chosen to be declared at the starting.

# Changed dictionary to an array to quicken the solution
SCREAMING_SNAKE_CASE__   :      list[bool | None]							=[None] * 1000_0000
SCREAMING_SNAKE_CASE__   :      Optional[int]							=True
SCREAMING_SNAKE_CASE__   :      str							=False



def 					UpperCamelCase					(       SCREAMING_SNAKE_CASE_ )      ->bool:







    if CHAINS[number - 1] is not None:
        return CHAINS[number - 1]  # type: ignore

    _lowerCamelCase	: str       =       chain(next_number(UpperCamelCase__ ) )
    _lowerCamelCase	: Dict       =       number_chain

    while number < 1000_0000:
        _lowerCamelCase	: Dict       =       number_chain
        number *= 10

    return number_chain



def 					UpperCamelCase					(       SCREAMING_SNAKE_CASE_ = 1000_0000 )      ->int:







    for i in range(1						,	UpperCamelCase__ ):
        if CHAINS[i] is None:
            chain(i + 1 )

    return CHAINS[:number].count(UpperCamelCase__ )


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  print(F"""{solution() = }""")






from typing import List

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


_lowercase							:   Any						=						logging.get_logger(__name__)

_lowercase							:   Union[str, Any]						=						{
    "snap-research/efficientformer-l1-300": (
        "https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json"
    ),
}






class    _UpperCamelCase     (       __snake_case					):

				"""simple docstring"""







				lowerCAmelCase					=			'efficientformer'

				def __init__(    self					, a__ = [3, 2, 6, 4]					, a__ = [48, 96, 224, 448]					, a__ = [True, True, True, True]					, a__ = 448					, a__ = 32					, a__ = 4					, a__ = 7					, a__ = 5					, a__ = 8					, a__ = 4					, a__ = 0.0					, a__ = 16					, a__ = 3					, a__ = 3					, a__ = 3					, a__ = 2					, a__ = 1					, a__ = 0.0					, a__ = 1					, a__ = True					, a__ = True					, a__ = 1e-5					, a__ = "gelu"					, a__ = 0.02					, a__ = 1e-12					, a__ = 224					, a__ = 1e-05					, **a__					, )						->					None:
					super().__init__(**a__ )

					A             =					hidden_act
					A             =					hidden_dropout_prob
					A             =					hidden_sizes
					A             =					num_hidden_layers
					A             =					num_attention_heads
					A             =					initializer_range
					A             =					layer_norm_eps
					A             =					patch_size
					A             =					num_channels
					A             =					depths
					A             =					mlp_expansion_ratio
					A             =					downsamples
					A             =					dim
					A             =					key_dim
					A             =					attention_ratio
					A             =					resolution
					A             =					pool_size
					A             =					downsample_patch_size
					A             =					downsample_stride
					A             =					downsample_pad
					A             =					drop_path_rate
					A             =					num_metaad_blocks
					A             =					distillation
					A             =					use_layer_scale
					A             =					layer_scale_init_value
					A             =					image_size
					A             =					batch_norm_eps



