






"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_flax_available, is_torch_available


_SCREAMING_SNAKE_CASE	       =      {
    """configuration_gpt_neo""": ["""GPT_NEO_PRETRAINED_CONFIG_ARCHIVE_MAP""", """GPTNeoConfig""", """GPTNeoOnnxConfig"""],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_SCREAMING_SNAKE_CASE	       =      [
		    """GPT_NEO_PRETRAINED_MODEL_ARCHIVE_LIST""",
		    """GPTNeoForCausalLM""",
		    """GPTNeoForQuestionAnswering""",
		    """GPTNeoForSequenceClassification""",
		    """GPTNeoForTokenClassification""",
		    """GPTNeoModel""",
		    """GPTNeoPreTrainedModel""",
		    """load_tf_weights_in_gpt_neo""",
		]

try:
		if not is_flax_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_SCREAMING_SNAKE_CASE	       =      [
		    """FlaxGPTNeoForCausalLM""",
		    """FlaxGPTNeoModel""",
		    """FlaxGPTNeoPreTrainedModel""",
		]


if TYPE_CHECKING:
		from .configuration_gpt_neo import GPT_NEO_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTNeoConfig, GPTNeoOnnxConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_gpt_neo import (
				    GPT_NEO_PRETRAINED_MODEL_ARCHIVE_LIST,
				    GPTNeoForCausalLM,
				    GPTNeoForQuestionAnswering,
				    GPTNeoForSequenceClassification,
				    GPTNeoForTokenClassification,
				    GPTNeoModel,
				    GPTNeoPreTrainedModel,
				    load_tf_weights_in_gpt_neo,
				)

		try:
				if not is_flax_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_flax_gpt_neo import FlaxGPTNeoForCausalLM, FlaxGPTNeoModel, FlaxGPTNeoPreTrainedModel


else:
		import sys

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


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