





'''simple docstring'''

from collections.abc import Sequence





def 		UpperCamelCase							(				_lowerCamelCase   :   Sequence[int] | None = None			):
    if nums is None or not nums:
        raise ValueError("Input sequence should not be empty"			)

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

    return ans


if __name__ == "__main__":
  import doctest

  doctest.testmod()

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










'''simple docstring'''

from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
  if not (is_transformers_available() and is_torch_available()):
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  from ...utils.dummy_torch_and_transformers_objects import KandinskyPipeline, KandinskyPriorPipeline
else:
  from .pipeline_kandinsky import KandinskyPipeline
  from .pipeline_kandinsky_imgaimg import KandinskyImgaImgPipeline
  from .pipeline_kandinsky_inpaint import KandinskyInpaintPipeline
  from .pipeline_kandinsky_prior import KandinskyPriorPipeline, KandinskyPriorPipelineOutput
  from .text_encoder import MultilingualCLIP



