
"""simple docstring"""







from abc import ABC, abstractmethod
from argparse import ArgumentParser







class 							__magic_name__     (		lowercase__   ):





					@staticmethod
					@abstractmethod
					def 							lowerCAmelCase      (				snake_case_   :							ArgumentParser    ):
												raise NotImplementedError()





					@abstractmethod
					def 							lowerCAmelCase      (				self   :							str    ):
												raise NotImplementedError()


"""simple docstring"""







from collections.abc import Sequence
def   __UpperCamelCase   (					SCREAMING_SNAKE_CASE = None )  ->     int:







							"""simple docstring"""


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

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

							return ans


if __name__ == "__main__":
		import doctest

		doctest.testmod()

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