






from collections.abc import Sequence







def 		SCREAMING_SNAKE_CASE							( __lowerCAmelCase = None      )			->     int:
					if nums is None or not nums:
										raise ValueError("Input sequence should not be empty"      )

					UpperCamelCase__      :       Any	    =  nums[0]
					for i in range(1 ,   len(_lowerCAmelCase      )      ):
										UpperCamelCase__      :       Any	    =  nums[i]
										UpperCamelCase__      :       List[str]	    =  max(_lowerCAmelCase ,   ans + num ,   _lowerCAmelCase      )

					return ans


if __name__ == "__main__":
	import doctest

	doctest.testmod()

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







def 		SCREAMING_SNAKE_CASE							( __lowerCAmelCase      )			->     int:
     assert isinstance(__lowerCAmelCase ,   __lowerCAmelCase      ), f'The input value of [n={number}] is not an integer'

     if number == 1:
          return 2
     elif number < 1:
          UpperCamelCase__      :       List[Any]	    =  f'The input value of [n={number}] has to be > 0'
          raise ValueError(__lowerCAmelCase      )
     else:
          UpperCamelCase__      :       Optional[Any]	    =  sylvester(number - 1      )
          UpperCamelCase__      :       str	    =  num - 1
          UpperCamelCase__      :       int	    =  num
          return lower * upper + 1


if __name__ == "__main__":
 print(F"""The 8th number in Sylvester's sequence: {sylvester(8)}""")