f=lambda a:max(sum(x)for x in zip(a,a[1:])if 0in x)
for test in [[1,4,3,6,0,3,7,0],[9,4,9,0,9,0,9,15,-2],[-4,-6,-2,0,-9],[-11,0,0,0,0,0,-12,10],[0,20]]:
print test
print f(test)
print ''
Zj1sYW1iZGEgYTptYXgoc3VtKHgpZm9yIHggaW4gemlwKGEsYVsxOl0paWYgMGluIHgpCgpmb3IgdGVzdCBpbiBbWzEsNCwzLDYsMCwzLDcsMF0sWzksNCw5LDAsOSwwLDksMTUsLTJdLFstNCwtNiwtMiwwLC05XSxbLTExLDAsMCwwLDAsMCwtMTIsMTBdLFswLDIwXV06CglwcmludCB0ZXN0CglwcmludCBmKHRlc3QpCglwcmludCAnJw==
[1, 4, 3, 6, 0, 3, 7, 0]
7
[9, 4, 9, 0, 9, 0, 9, 15, -2]
9
[-4, -6, -2, 0, -9]
-2
[-11, 0, 0, 0, 0, 0, -12, 10]
0
[0, 20]
20