-2 1 -3 4 -1 2 1 -5 4
6
nums = [int(x) for x in input().split()] current = nums[0] best = nums[0] for i in range(1, len(nums)): current = max(nums[i], current + nums[i]) best = max(best, current) print(best)