



import os

# Precomputes a list of the 100 first triangular numbers
__snake_case     :Optional[int]			       =[int(0.5 * n * (n + 1)) for n in range(1, 101)]






def  lowerCamelCase_	(      )       ->							int:

							'''simple docstring'''






							A      						=    os.path.dirname(os.path.realpath(lowerCAmelCase__				)				)
							A      						=    os.path.join(lowerCAmelCase__			,	'words.txt'				)

							A      						=    ''
							with open(lowerCAmelCase__				) as f:
														A      						=    f.readline()

							A      						=    [word.strip('"'				) for word in words.strip('\r\n'				).split(','				)]
							A      						=    [
							    word
							    for word in [sum(ord(lowerCAmelCase__				) - 64 for x in word				) for word in words]
							    if word in TRIANGULAR_NUMBERS
							]
							return len(lowerCAmelCase__				)


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




from collections.abc import Sequence






def  lowerCamelCase_	(      lowerCAmelCase__	:	Sequence[int] | None = None				)       ->							int:

							'''simple docstring'''






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

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

							return ans


if __name__ == "__main__":
				import doctest

				doctest.testmod()

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