

from collections.abc import Sequence







def 							_lowerCamelCase   (			SCREAMING_SNAKE_CASE = None   ):
      '''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(SCREAMING_SNAKE_CASE   )   ):
            A_							       =		nums[i]
            A_							       =		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
      __lowercase				      =						int(input("""Enter number of elements : """).strip())
      __lowercase				      =						list(map(int, input("""\nEnter the numbers : """).strip().split()))[:n]
      print(max_subsequence_sum(array))








def 							_lowerCamelCase   (			SCREAMING_SNAKE_CASE = 100   ):
      '''simple docstring'''







      A_							       =		0
      A_							       =		0
      for i in range(1		,				n + 1   ):
            sum_of_squares += i**2
            sum_of_ints += i
      return sum_of_ints**2 - sum_of_squares


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





