






from collections.abc import Sequence




def      lowercase__      (     __snake_case    :							Sequence[int] | None = None  ):


					'''simple docstring'''


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

					UpperCAmelCase_    :      Optional[int]            =						nums[0]
					for i in range(1     ,       len(__snake_case  )  ):
										UpperCAmelCase_    :      Dict            =						nums[i]
										UpperCAmelCase_    :      Optional[Any]            =						max(__snake_case     ,       ans + num     ,       __snake_case  )

					return ans


if __name__ == "__main__":
		import doctest

		doctest.testmod()

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










'''simple docstring'''







A__:    Tuple					    =       '''
# Installazione di Transformers
! pip install transformers datasets
# Per installare dalla fonte invece dell\'ultima versione rilasciata, commenta il comando sopra e
# rimuovi la modalità commento al comando seguente.
# ! pip install git+https://github.com/huggingface/transformers.git
'''

A__:    Tuple					    =       [{'''type''': '''code''', '''content''': INSTALL_CONTENT}]
A__:    Any					    =       {
    '''{processor_class}''': '''FakeProcessorClass''',
    '''{model_class}''': '''FakeModelClass''',
    '''{object_class}''': '''FakeObjectClass''',
}


