


'''simple docstring'''



from decimal import Decimal, getcontext
from math import ceil, factorial



def      UpperCAmelCase__   (      UpperCAmelCase_       :							int				)	->						str:

     if not isinstance(UpperCAmelCase_ ,       UpperCAmelCase_				):
          raise TypeError('Undefined for non-integers'				)
     elif precision < 1:
          raise ValueError('Undefined for non-natural numbers'				)

     __lowerCamelCase  :      List[Any]														=						precision
     __lowerCamelCase  :      Tuple														=						ceil(precision / 14				)
     __lowerCamelCase  :      Union[str, Any]														=						42_68_80 * Decimal(1_00_05				).sqrt()
     __lowerCamelCase  :      List[str]														=						1
     __lowerCamelCase  :      Dict														=						13_59_14_09
     __lowerCamelCase  :      Union[str, Any]														=						Decimal(UpperCAmelCase_				)
     for k in range(1 ,       UpperCAmelCase_				):
          __lowerCamelCase  :      List[Any]														=						factorial(6 * k				) // (factorial(3 * k				) * factorial(UpperCAmelCase_				) ** 3)
          linear_term += 5_45_14_01_34
          exponential_term *= -26_25_37_41_26_40_76_80_00
          partial_sum += Decimal(multinomial_term * linear_term				) / exponential_term
     return str(constant_term / partial_sum				)[:-1]


if __name__ == "__main__":
      A__						:   Any				=    50
      print(f'''The first {n} digits of pi is: {pi(n)}''')








from collections.abc import Sequence


def 				__A(lowerCAmelCase = None			)		->					int:

		"""simple docstring"""






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

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

		return ans


if __name__ == "__main__":
		import doctest

		doctest.testmod()

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



