

snake_case_        =			[sum(int(c, 10) ** 2 for c in i.__str__()) for i in range(100_000)]

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int      ):



     '''simple docstring'''





     lowercase__   :       Optional[Any]				=	0
     while number:
          # Increased Speed Slightly by checking every 5 digits together.
          sum_of_digits_squared += DIGITS_SQUARED[number % 100_000]
          number //= 100_000

     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
snake_case_        =			[None] * 10_000_000
snake_case_        =			True
snake_case_        =			False

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int      ):



     '''simple docstring'''





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

     lowercase__   :       Tuple				=	chain(next_number(SCREAMING_SNAKE_CASE_      )      )
     lowercase__   :       Tuple				=	number_chain

     while number < 10_000_000:
          lowercase__   :       List[Any]				=	number_chain
          number *= 10

     return number_chain

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int = 10_000_000      ):



     '''simple docstring'''





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

     return CHAINS[:number].count(SCREAMING_SNAKE_CASE_      )


if __name__ == "__main__":
       import doctest

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




from __future__ import annotations

from collections.abc import Callable

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   Callable[[int | float], int | float]     ,					SCREAMING_SNAKE_CASE_		:   int | float     ,					SCREAMING_SNAKE_CASE_		:   int | float     ,					SCREAMING_SNAKE_CASE_		:   int = 100     ,					):



     '''simple docstring'''





     lowercase__   :       Tuple				=	x_start
     lowercase__   :       Tuple				=	fnc(SCREAMING_SNAKE_CASE_      )
     lowercase__   :       List[Any]				=	0.0
     for _ in range(SCREAMING_SNAKE_CASE_      ):
          # Approximates small segments of curve as linear and solve
          # for trapezoidal area
          lowercase__   :       Any				=	(x_end - x_start) / steps + xa
          lowercase__   :       Optional[Any]				=	fnc(SCREAMING_SNAKE_CASE_      )
          area += abs(fxa + fxa      ) * (xa - xa) / 2
          # Increment step
          lowercase__   :       Any				=	xa
          lowercase__   :       str				=	fxa
     return area


if __name__ == "__main__":

       def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   Tuple      ):



            '''simple docstring'''





            return x**3 + x**2

       print('''f(x) = x^3 + x^2''')
       print('''The area between the curve, x = -5, x = 5 and the x axis is:''')
       snake_case_        =			10
       while i <= 100_000:
              print(F'''with {i} steps: {trapezoidal_area(f, -5, 5, i)}''')
              i *= 10

