from collections.abc import Sequence


def        __lowerCAmelCase      (	_A = None       ):



							"""simple docstring"""


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

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

							return ans


if __name__ == "__main__":
				import doctest

				doctest.testmod()

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






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__a	 =      {
    """configuration_pegasus_x""": ["""PEGASUS_X_PRETRAINED_CONFIG_ARCHIVE_MAP""", """PegasusXConfig"""],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __a	 =      [
     """PEGASUS_X_PRETRAINED_MODEL_ARCHIVE_LIST""",
     """PegasusXForConditionalGeneration""",
     """PegasusXModel""",
     """PegasusXPreTrainedModel""",
 ]


if TYPE_CHECKING:
 from .configuration_pegasus_x import PEGASUS_X_PRETRAINED_CONFIG_ARCHIVE_MAP, PegasusXConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_pegasus_x import (
      PEGASUS_X_PRETRAINED_MODEL_ARCHIVE_LIST,
      PegasusXForConditionalGeneration,
      PegasusXModel,
      PegasusXPreTrainedModel,
  )


else:
 import sys

 __a	 =      _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



