





'''simple docstring'''

lowercase__						:      int	=    [sum(int(c, 10) ** 2 for c in i.__str__()) for i in range(10_00_00)]







def  a__    (    lowercase :					int				)		->		int:





     """simple docstring"""

     _UpperCamelCase       =	0
     while number:
          # Increased Speed Slightly by checking every 5 digits together.
          sum_of_digits_squared += DIGITS_SQUARED[number % 100000]
          number //= 100000

     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
lowercase__						:      list[bool | None]	=    [None] * 10_00_00_00
lowercase__						:      Dict	=    True
lowercase__						:      Any	=    False







def  a__    (    lowercase :					int				)		->		bool:





     """simple docstring"""

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

     _UpperCamelCase       =	chain(next_number(lowercase				)				)
     _UpperCamelCase       =	number_chain

     while number < 10000000:
          _UpperCamelCase       =	number_chain
          number *= 10

     return number_chain







def  a__    (    lowercase :					int = 10000000				)		->		int:





     """simple docstring"""

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

     return CHAINS[:number].count(lowercase				)


if __name__ == "__main__":
   import doctest

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













'''simple docstring'''

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


lowercase__						:      Optional[Any]	=    logging.get_logger(__name__)

lowercase__						:      List[Any]	=    {
    'microsoft/biogpt': 'https://huggingface.co/microsoft/biogpt/resolve/main/config.json',
    # See all BioGPT models at https://huggingface.co/models?filter=biogpt
}
class     __lowerCAmelCase					(   __magic_name__			):






       """simple docstring"""
       _snake_case     :					Union[str, Any]						    =   'biogpt'





       def __init__(							self       :		Optional[Any]	,			lowerCAmelCase__       :		List[str]=42384	,			lowerCAmelCase__       :		Optional[int]=1024	,			lowerCAmelCase__       :		List[str]=24	,			lowerCAmelCase__       :		List[Any]=16	,			lowerCAmelCase__       :		Optional[int]=4096	,			lowerCAmelCase__       :		Optional[int]="gelu"	,			lowerCAmelCase__       :		Optional[Any]=0.1	,			lowerCAmelCase__       :		Optional[int]=0.1	,			lowerCAmelCase__       :		Union[str, Any]=1024	,			lowerCAmelCase__       :		List[str]=0.02	,			lowerCAmelCase__       :		Tuple=1e-1_2	,			lowerCAmelCase__       :		Dict=True	,			lowerCAmelCase__       :		Tuple=True	,			lowerCAmelCase__       :		Dict=0.0	,			lowerCAmelCase__       :		Union[str, Any]=0.0	,			lowerCAmelCase__       :		Optional[int]=1	,			lowerCAmelCase__       :		Union[str, Any]=0	,			lowerCAmelCase__       :		Optional[Any]=2	,			**lowerCAmelCase__       :		Optional[Any]	,			)   ->					Tuple:

            '''simple docstring'''




            _UpperCamelCase       =	vocab_size
            _UpperCamelCase       =	max_position_embeddings
            _UpperCamelCase       =	hidden_size
            _UpperCamelCase       =	num_hidden_layers
            _UpperCamelCase       =	num_attention_heads
            _UpperCamelCase       =	intermediate_size
            _UpperCamelCase       =	hidden_act
            _UpperCamelCase       =	hidden_dropout_prob
            _UpperCamelCase       =	attention_probs_dropout_prob
            _UpperCamelCase       =	initializer_range
            _UpperCamelCase       =	layer_norm_eps
            _UpperCamelCase       =	scale_embedding
            _UpperCamelCase       =	use_cache
            _UpperCamelCase       =	layerdrop
            _UpperCamelCase       =	activation_dropout
            super().__init__(pad_token_id=lowerCAmelCase__	,			bos_token_id=lowerCAmelCase__	,			eos_token_id=lowerCAmelCase__	,			**lowerCAmelCase__					)



