


"""simple docstring"""



from collections.abc import Sequence







def 						__lowerCAmelCase		(		lowercase						:						Sequence[int] | None = None				)			->		int:


    """simple docstring"""





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

    snake_case					:   Any         =					nums[0]
    for i in range(1		,							len(lowercase				)				):
        snake_case					:   List[str]         =					nums[i]
        snake_case					:   int         =					max(lowercase		,							ans + num		,							lowercase				)

    return ans


if __name__ == "__main__":
  import doctest

  doctest.testmod()

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









"""simple docstring"""



import baseaa







def 						__lowerCAmelCase		(		lowercase						:						str				)			->		bytes:


    """simple docstring"""





    return baseaa.aaaencode(string.encode("utf-8"				)				)







def 						__lowerCAmelCase		(		lowercase						:						bytes				)			->		str:


    """simple docstring"""





    return baseaa.aaadecode(lowercase				).decode("utf-8"				)


if __name__ == "__main__":
  import doctest

  doctest.testmod()





