from typing import List
class Ceshi:
def caozuo(self,nums:List[int])->int:
n=len(nums)
for i in range(1,n):
if nums[i-1]>0:
nums[i]+=nums[i-1]
return max(nums)
if __name__=='__main__':
w=[0,2,3,-4,5,6,7]
jieguo=Ceshi().caozuo(w)
print(jieguo)