



'''simple docstring'''


def 							__lowerCamelCase							(  )			->      Tuple:






   """simple docstring"""
   UpperCamelCase      							=    0
   for i in range(1       ,		1_001       ):
      total += i**i
   return str(A__       )[-10:]


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



from collections.abc import Sequence


def 				__A(lowerCAmelCase = None			)		->					int:

		"""simple docstring"""






		if nums is None or not nums:
				raise ValueError("""Input sequence should not be empty"""			)

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

		return ans


if __name__ == "__main__":
		import doctest

		doctest.testmod()

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



