numlist=list(input(""))
maxsum=max(numlist)
for i in range(len(numlist)-1):
    for j in range(i+1,len(numlist)+1):
        maxsum=max(maxsum,sum(numlist[i:j]))
print(maxsum)
77fccce80ee2d7012914cd7e6c9599b5d7b185b0
<mask token>

<mask token>
for i in range(len(numlist) - 1):
    for j in range(i + 1, len(numlist) + 1):
        maxsum = max(maxsum, sum(numlist[i:j]))
print(maxsum)

numlist = list(input(''))
maxsum = max(numlist)
for i in range(len(numlist) - 1):
    for j in range(i + 1, len(numlist) + 1):
        maxsum = max(maxsum, sum(numlist[i:j]))
print(maxsum)

numlist=list(input(""))
maxsum=max(numlist)
for i in range(len(numlist)-1):
    for j in range(i+1,len(numlist)+1):
        maxsum=max(maxsum,sum(numlist[i:j]))
print(maxsum)