22 lines
519 B
Python
22 lines
519 B
Python
import itertools
|
|
import sys
|
|
|
|
|
|
def run(nums):
|
|
best = 0
|
|
for i in xrange(len(nums)):
|
|
if nums[i] % 2 == 1:
|
|
cur_best = nums[i]
|
|
if cur_best > best: best = cur_best
|
|
for j in xrange(i + 1, len(nums)):
|
|
if nums[j] % 2 == 0:
|
|
break
|
|
cur_best += nums[j]
|
|
if cur_best > best:
|
|
best = cur_best
|
|
print best
|
|
|
|
for line in sys.stdin:
|
|
nums = [int(i) for i in line.strip().split()]
|
|
run(nums)
|