class Solution:
def maxsumofSubarray(self , arr ):
s = 0
res = []
for i in arr:
s += i
if s >= 0:
res.append(s)
else:
s = 0
res = []
return max(res)