






"""simple docstring"""







from __future__ import annotations
def   __UpperCamelCase   (					SCREAMING_SNAKE_CASE							,    SCREAMING_SNAKE_CASE )  ->     list[str]:







							"""simple docstring"""


							if nth_term == "":
														return [""]
							__snake_case     			=       int(SCREAMING_SNAKE_CASE )
							__snake_case     			=       int(SCREAMING_SNAKE_CASE )
							__snake_case     			=       []
							for temp in range(int(SCREAMING_SNAKE_CASE ) ):
														series.append(F'''1 / {pow(temp + 1							,    int(SCREAMING_SNAKE_CASE ) )}''' if series else "1" )
							return series


if __name__ == "__main__":
		import doctest

		doctest.testmod()

		_SCREAMING_SNAKE_CASE	       =      int(input("""Enter the last number (nth term) of the P-Series"""))
		_SCREAMING_SNAKE_CASE	       =      int(input("""Enter the power for  P-Series"""))
		print("""Formula of P-Series => 1+1/2^p+1/3^p ..... 1/n^p""")
		print(p_series(nth_term, power))


"""simple docstring"""







from collections.abc import Sequence
def   __UpperCamelCase   (					SCREAMING_SNAKE_CASE = None )  ->     int:







							"""simple docstring"""


							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(SCREAMING_SNAKE_CASE ) ):
														__snake_case     			=       nums[i]
														__snake_case     			=       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
		_SCREAMING_SNAKE_CASE	       =      int(input("""Enter number of elements : """).strip())
		_SCREAMING_SNAKE_CASE	       =      list(map(int, input("""\nEnter the numbers : """).strip().split()))[:n]
		print(max_subsequence_sum(array))
