




'''simple docstring'''




from collections.abc import Sequence

def       _UpperCamelCase					( SCREAMING_SNAKE_CASE__	:					List[Any] = None				):
 '''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(SCREAMING_SNAKE_CASE__				)				):
  UpperCAmelCase__								=			nums[i]
  UpperCAmelCase__								=			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
    UpperCAmelCase_				 =					int(input('Enter number of elements : ').strip())
    UpperCAmelCase_				 =					list(map(int, input('\nEnter the numbers : ').strip().split()))[:n]
    print(max_subsequence_sum(array))







from __future__ import annotations







def  _SCREAMING_SNAKE_CASE				(   a					,						a					,						a  )      ->      float:
					if days_between_payments <= 0:
										raise ValueError('days_between_payments must be > 0'  )
					if daily_interest_rate < 0:
										raise ValueError('daily_interest_rate must be >= 0'  )
					if principal <= 0:
										raise ValueError('principal must be > 0'  )
					return principal * daily_interest_rate * days_between_payments







def  _SCREAMING_SNAKE_CASE				(   a					,						a					,						a					,						)      ->      float:
					if number_of_compounding_periods <= 0:
										raise ValueError('number_of_compounding_periods must be > 0'  )
					if nominal_annual_interest_rate_percentage < 0:
										raise ValueError('nominal_annual_interest_rate_percentage must be >= 0'  )
					if principal <= 0:
										raise ValueError('principal must be > 0'  )

					return principal * (
					    (1 + nominal_annual_interest_rate_percentage) ** number_of_compounding_periods
					    - 1
					)







def  _SCREAMING_SNAKE_CASE				(   a					,						a					,						a					,						)      ->      float:
					if number_of_years <= 0:
										raise ValueError('number_of_years must be > 0'  )
					if nominal_annual_percentage_rate < 0:
										raise ValueError('nominal_annual_percentage_rate must be >= 0'  )
					if principal <= 0:
										raise ValueError('principal must be > 0'  )

					return compound_interest(
					    a					,						nominal_annual_percentage_rate / 3_65					,						number_of_years * 3_65  )


if __name__ == "__main__":
				import doctest

				doctest.testmod()




