-2 1 -3 4 -1 2 1 -5 4
6
nums = list(map(int, input().split())) current = best = nums[0] for n in nums[1:]: current = max(n, current + n) best = max(best, current) print(best)