
def       UpperCAmelCase__							(    __magic_name__  :       int = 10_00					):


					'''simple docstring'''

					lowerCAmelCase						:   str							=       0
					lowerCAmelCase						:   Any							=       (n - 1) // 3
					total += ((terms) * (6 + (terms - 1) * 3)) // 2  # total of an A.P.
					lowerCAmelCase						:   Optional[Any]							=       (n - 1) // 5
					total += ((terms) * (10 + (terms - 1) * 5)) // 2
					lowerCAmelCase						:   Tuple							=       (n - 1) // 15
					total -= ((terms) * (30 + (terms - 1) * 15)) // 2
					return total


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


def       UpperCAmelCase__							(    __magic_name__  :       int = 99_80_01					):


					'''simple docstring'''

					lowerCAmelCase						:   Tuple							=       0
					for i in range(9_99							,					99							,					-1					):  # 3 digit numbers range from 999 down to 100
										for j in range(9_99							,					99							,					-1					):
															lowerCAmelCase						:   Any							=       str(i * j					)
															if product_string == product_string[::-1] and i * j < n:
																				lowerCAmelCase						:   Optional[int]							=       max(__magic_name__							,					i * j					)
					return answer


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