




'''simple docstring'''



def 			SCREAMING_SNAKE_CASE_			(							__A    :			list  )			->			bool:
   if not isinstance(__A	,					__A  ):
      raise ValueError("Input series is not valid, valid series - [2, 4, 6]"  )
   if len(__A  ) == 0:
      raise ValueError("Input list must be a non empty list"  )
   if len(__A  ) == 1:
      return True
   _SCREAMING_SNAKE_CASE	=				series[1] - series[0]
   for index in range(len(__A  ) - 1  ):
      if series[index + 1] - series[index] != common_diff:
         return False
   return True
def 			SCREAMING_SNAKE_CASE_			(							__A    :			list  )			->			float:
   if not isinstance(__A	,					__A  ):
      raise ValueError("Input series is not valid, valid series - [2, 4, 6]"  )
   if len(__A  ) == 0:
      raise ValueError("Input list must be a non empty list"  )
   _SCREAMING_SNAKE_CASE	=				0
   for val in series:
      answer += val
   return answer / len(__A  )


if __name__ == "__main__":
 import doctest

 doctest.testmod()







'''simple docstring'''



from collections.abc import Sequence
def 			SCREAMING_SNAKE_CASE_			(							__A    :			Sequence[int] | None = None  )			->			int:
   if nums is None or not nums:
      raise ValueError("Input sequence should not be empty"  )

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

   return ans


if __name__ == "__main__":
 import doctest

 doctest.testmod()

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

