
from collections.abc import Sequence






def        a_		(       __lowercase   :	Sequence[int] | None = None ) ->  int:
			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(__lowercase ) ):
						_snake_case		=			nums[i]
						_snake_case		=			max(__lowercase       ,					ans + num       ,					__lowercase )

			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       :				List[Any]       =			list(map(int, input('''\nEnter the numbers : ''').strip().split()))[:n]
			print(max_subsequence_sum(array))

from collections.abc import Sequence






def        a_		(       __lowercase   :	Sequence[float]       ,					__lowercase   :	float ) ->  float:
			return sum(c * (x**i) for i, c in enumerate(__lowercase ) )






def        a_		(       __lowercase   :	Sequence[float]       ,					__lowercase   :	float ) ->  float:
			_snake_case		=			0.0
			for coeff in reversed(__lowercase ):
						_snake_case		=			result * x + coeff
			return result


if __name__ == "__main__":
			_lowerCamelCase       :				Optional[Any]       =			(0.0, 0.0, 5.0, 9.3, 7.0)
			_lowerCamelCase       :				Optional[int]       =			1_0.0
			print(evaluate_poly(poly, x))
			print(horner(poly, x))