


UpperCAmelCase__   	=							[sum(int(c, 10) ** 2 for c in i.__str__()) for i in range(10_0000)]
def 				UpperCAmelCase_					(							__snake_case						)     ->			int:







 """simple docstring"""


 _lowercase							      =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
UpperCAmelCase__   	=							[None] * 1000_0000
UpperCAmelCase__   	=							True
UpperCAmelCase__   	=							False
def 				UpperCAmelCase_					(							__snake_case						)     ->			bool:







 """simple docstring"""


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

 _lowercase							      =chain(next_number(__snake_case						)						)
 _lowercase							      =number_chain

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

 return number_chain
def 				UpperCAmelCase_					(							__snake_case = 10000000						)     ->			int:







 """simple docstring"""


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

 return CHAINS[:number].count(__snake_case						)


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  print(f'''{solution() = }''')





# flake8: noqa
# Lint as: python3
UpperCAmelCase__   	=							[
    '''VerificationMode''',
    '''Version''',
    '''disable_progress_bar''',
    '''enable_progress_bar''',
    '''is_progress_bar_enabled''',
    '''experimental''',
]

from .info_utils import VerificationMode
from .logging import disable_progress_bar, enable_progress_bar, is_progress_bar_enabled
from .version import Version
from .experimental import experimental

