
"""simple docstring"""


A_    							=					[sum(int(c, 10) ** 2 for c in i.__str__()) for i in range(10_0000)]






def  lowercase						(	lowerCAmelCase__						):
			lowerCamelCase_					=  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
A_    							=					[None] * 1000_0000
A_    							=					True
A_    							=					False






def  lowercase						(	lowerCAmelCase__						):

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

			lowerCamelCase_					=  chain(next_number(lowercase__						)						)
			lowerCamelCase_					=  number_chain

			while number < 10_000_000:
						lowerCamelCase_					=  number_chain
						number *= 10

			return number_chain






def  lowercase						(	lowerCAmelCase__ = 10_000_000						):
			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"""






import operator as op







def 	_snake_case     (							lowercase__						):
				_lowerCamelCase	:     Dict       =       []
				_lowerCamelCase	:     List[str]       =       lambda lowercase__				,       lowercase__						: int(x / y						)  # noqa: E731 integer division operation
				_lowerCamelCase	:     Optional[int]       =       {
				    '^': op.pow,
				    '*': op.mul,
				    '/': div,
				    '+': op.add,
				    '-': op.sub,
				}  # operators & their respective operation

				# print table header
				print('Symbol'.center(8						)				,       'Action'.center(12						)				,       'Stack'				,       sep=' | '						)
				print('-' * (30 + len(lowercase__						))						)

				for x in post_fix:
								if x.isdigit():  # if x in digit
												stack.append(lowercase__						)  # append x to stack
												# output in tabular format
												print(x.rjust(8						)				,       ('push(' + x + ')').ljust(12						)				,       ','.join(lowercase__						)				,       sep=' | '						)
								else:
												_lowerCamelCase	:     int       =       stack.pop()  # pop stack
												# output in tabular format
												print(''.rjust(8						)				,       ('pop(' + b + ')').ljust(12						)				,       ','.join(lowercase__						)				,       sep=' | '						)

												_lowerCamelCase	:     Tuple       =       stack.pop()  # pop stack
												# output in tabular format
												print(''.rjust(8						)				,       ('pop(' + a + ')').ljust(12						)				,       ','.join(lowercase__						)				,       sep=' | '						)

												stack.append(
												    str(opr[x](int(lowercase__						)				,       int(lowercase__						)						)						)						)  # evaluate the 2 values popped from stack & push result to stack
												# output in tabular format
												print(
												    x.rjust(8						)				,       ('push(' + a + x + b + ')').ljust(12						)				,       ','.join(lowercase__						)				,       sep=' | '				,       )

				return int(stack[0]						)


if __name__ == "__main__":
			lowercase__			=		input("""\n\nEnter a Postfix Equation (space separated) = """).split(""" """)
			print("""\n\tResult = """, solve(Postfix))