


'''simple docstring'''

from collections.abc import Sequence

def 							__magic_name__(						lowerCamelCase = None):
						if nums is None or not nums:
												raise ValueError('''Input sequence should not be empty''')

						__lowerCAmelCase							       =				nums[0]
						for i in range(1,				len(lowerCamelCase)):
												__lowerCAmelCase							       =				nums[i]
												__lowerCAmelCase							       =				max(lowerCamelCase,				ans + num,				lowerCamelCase)

						return ans


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	# Try on a sample input from the user
	_UpperCAmelCase				: Optional[Any]							    =				int(input("""Enter number of elements : """).strip())
	_UpperCAmelCase				: Tuple							    =				list(map(int, input("""\nEnter the numbers : """).strip().split()))[:n]
	print(max_subsequence_sum(array))







'''simple docstring'''

def 							__magic_name__(						):
						return [
						    a * b * (1_0_0_0 - a - b)
						    for a in range(1,				9_9_9)
						    for b in range(lowerCamelCase,				9_9_9)
						    if (a * a + b * b == (1_0_0_0 - a - b) ** 2)
						][0]


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

