
'''simple docstring'''






from collections.abc import Sequence







def 		A_       (	_lowerCAmelCase   :    Sequence[int] | None = None							):



      """simple docstring"""




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

      _lowerCamelCase				:   List[str]								=   nums[0]
      for i in range(1				,	len(_lowerCAmelCase							)							):
            _lowerCamelCase				:   Optional[Any]								=   nums[i]
            _lowerCamelCase				:   Tuple								=   max(_lowerCAmelCase				,	ans + num				,	_lowerCAmelCase							)

      return ans


if __name__ == "__main__":
 import doctest

 doctest.testmod()

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

'''simple docstring'''






def 		A_       (	_lowerCAmelCase   :    int							):



      """simple docstring"""




      if isinstance(_lowerCAmelCase				,	_lowerCAmelCase							):
            raise TypeError("'float' object cannot be interpreted as an integer"							)
      if isinstance(_lowerCAmelCase				,	_lowerCAmelCase							):
            raise TypeError("'str' object cannot be interpreted as an integer"							)

      if num == 0:
            return "0b0"

      _lowerCamelCase				:   Tuple								=   False

      if num < 0:
            _lowerCamelCase				:   List[Any]								=   True
            _lowerCamelCase				:   int								=   -num

      _lowerCamelCase				:   list[int]								=   []
      while num > 0:
            binary.insert(0				,	num % 2							)
            num >>= 1

      if negative:
            return "-0b" + "".join(str(_lowerCAmelCase							) for e in binary							)

      return "0b" + "".join(str(_lowerCAmelCase							) for e in binary							)


if __name__ == "__main__":
 import doctest

 doctest.testmod()