


'''simple docstring'''
from collections.abc import Sequence


def 			a      (			__a = None   )  ->	int:



					'''simple docstring'''






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

					UpperCamelCase__   :Optional[Any]												= nums[0]
					for i in range(1 ,					len(__a   )   ):
										UpperCamelCase__   :Tuple												= nums[i]
										UpperCamelCase__   :Union[str, Any]												= max(__a ,					ans + num ,					__a   )

					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'''
from PIL import Image


def 			a      (			__a ,					__a   )  ->	Image:



					'''simple docstring'''






					def brightness(__a   ) -> float:
										return 128 + level + (c - 128)

					if not -2_5_5.0 <= level <= 2_5_5.0:
										raise ValueError('''level must be between -255.0 (black) and 255.0 (white)'''   )
					return img.point(__a   )


if __name__ == "__main__":
		# Load image
		with Image.open('''image_data/lena.jpg''') as img:
				# Change brightness to 100
				__snake_case							      =     change_brightness(img, 100)
				brigt_img.save('''image_data/lena_brightness.png''', format='''png''')