"""simple docstring"""




from collections.abc import Sequence





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

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

  return ans


if __name__ == "__main__":
     import doctest

     doctest.testmod()

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



"""simple docstring"""




import socket





def 							SCREAMING_SNAKE_CASE					(      )	->				str:
  _lowerCAmelCase						:	Optional[int]        =					socket.socket(socket.AF_INET      ,socket.SOCK_STREAM     )
  _lowerCAmelCase						:	Optional[int]        =					socket.gethostname()
  _lowerCAmelCase						:	Tuple        =					12312

  sock.connect((host, port)     )
  sock.send(b"""Hello server!"""     )

  with open("""Received_file"""      ,"""wb"""     ) as out_file:
    print("""File opened"""     )
    print("""Receiving data..."""     )
    while True:
      _lowerCAmelCase						:	List[Any]        =					sock.recv(1024     )
      if not data:
        break
      out_file.write(_lowerCamelCase     )

  print("""Successfully received the file"""     )
  sock.close()
  print("""Connection closed"""     )


if __name__ == "__main__":
     main()




