






from __future__ import annotations

def     snake_case   (UpperCAmelCase__    )			->							float:
  UpperCamelCase_:   Optional[Any]        =							0.00
  UpperCamelCase_:   List[Any]        =							0
  for resistor in resistors:
    if resistor <= 0:
      UpperCamelCase_:   Union[str, Any]        =							F'''Resistor at index {index} has a negative or zero value!'''
      raise ValueError(UpperCAmelCase__    )
    first_sum += 1 / float(UpperCAmelCase__    )
    index += 1
  return 1 / first_sum

def     snake_case   (UpperCAmelCase__    )			->							float:
  UpperCamelCase_:   Tuple        =							0.00
  UpperCamelCase_:   Union[str, Any]        =							0
  for resistor in resistors:
    sum_r += resistor
    if resistor < 0:
      UpperCamelCase_:   Optional[int]        =							F'''Resistor at index {index} has a negative value!'''
      raise ValueError(UpperCAmelCase__    )
    index += 1
  return sum_r


if __name__ == "__main__":
   import doctest

   doctest.testmod()

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))



