Read a positive natural number n followed by n integers forming a sequence v[1], v[2], ..., v[n]. For a contiguous subarray v[i], v[i+1], ..., v[j] the sum is defined as v[i] + v[i+1] + ... + v[j].
Determine the maximum sum over all contiguous subarrays containing at least one element.