

lowerCAmelCase							:  Optional[int]            =						[0, 2, 4, 6, 8]
lowerCAmelCase							:  str            =						[1, 3, 5, 7, 9]







def       A_				(   _UpperCAmelCase    ,     _UpperCAmelCase    ,     _UpperCAmelCase    ,     _UpperCAmelCase   ):
						if remaining_length == 0:
												if digits[0] == 0 or digits[-1] == 0:
																		return 0

												for i in range(length // 2 - 1    ,     -1    ,     -1   ):
																		remainder += digits[i] + digits[length - i - 1]

																		if remainder % 2 == 0:
																								return 0

																		remainder //= 10

												return 1

						if remaining_length == 1:
												if remainder % 2 == 0:
																		return 0

												SCREAMING_SNAKE_CASE_:			Optional[int]  		=	0
												for digit in range(10   ):
																		SCREAMING_SNAKE_CASE_:			Optional[int]  		=	digit
																		result += reversible_numbers(
																		    0    ,     (remainder + 2 * digit) // 10    ,     _UpperCAmelCase    ,     _UpperCAmelCase   )
												return result

						SCREAMING_SNAKE_CASE_:			Optional[Any]  		=	0
						for digita in range(10   ):
												SCREAMING_SNAKE_CASE_:			Optional[Any]  		=	digita

												if (remainder + digita) % 2 == 0:
																		SCREAMING_SNAKE_CASE_:			Optional[int]  		=	ODD_DIGITS
												else:
																		SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	EVEN_DIGITS

												for digita in other_parity_digits:
																		SCREAMING_SNAKE_CASE_:			str  		=	digita
																		result += reversible_numbers(
																		    remaining_length - 2    ,     (remainder + digita + digita) // 10    ,     _UpperCAmelCase    ,     _UpperCAmelCase    ,     )
						return result







def       A_				(   _UpperCAmelCase = 9   ):
						SCREAMING_SNAKE_CASE_:			str  		=	0
						for length in range(1    ,     max_power + 1   ):
												result += reversible_numbers(_UpperCAmelCase    ,     0    ,     [0] * length    ,     _UpperCAmelCase   )
						return result


if __name__ == "__main__":
						print(f'''{solution() = }''')








import os

# Precomputes a list of the 100 first triangular numbers
lowerCAmelCase							:  Optional[int]            =						[int(0.5 * n * (n + 1)) for n in range(1, 101)]







def       A_				(   ):
						SCREAMING_SNAKE_CASE_:			List[str]  		=	os.path.dirname(os.path.realpath(_UpperCAmelCase   )   )
						SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	os.path.join(_UpperCAmelCase    ,     "words.txt"   )

						SCREAMING_SNAKE_CASE_:			Dict  		=	""
						with open(_UpperCAmelCase   ) as f:
												SCREAMING_SNAKE_CASE_:			int  		=	f.readline()

						SCREAMING_SNAKE_CASE_:			Optional[int]  		=	[word.strip("\""   ) for word in words.strip("\r\n"   ).split(","   )]
						SCREAMING_SNAKE_CASE_:			List[Any]  		=	[
						    word
						    for word in [sum(ord(_UpperCAmelCase   ) - 64 for x in word   ) for word in words]
						    if word in TRIANGULAR_NUMBERS
						]
						return len(_UpperCAmelCase   )


if __name__ == "__main__":
						print(solution())






