Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EISUBARRAY - Subarray with the largest sum

Given an array of integers A. A subarray of array A is an array of zero or more consecutive elements in A. Given array A, find the largest possible absolute sum of a non-empty subarray of A.

Input

The first line is an integer n 9 (n <= 106)
The second line is the n integers of array A.

The first line is an integer n  (n <= 106)

The second line is the n integers of array A.

Output

The largest possible sum

Example

Input:
7
-1 2 4 -1 6 -10 1

Output:
11

Added by:Ha Minh Ngoc
Date:2019-04-09
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.