arr = [int(x) for x in input()]  # Take array as input
flag = 0

for ele in arr:
    if ele != 0 and ele != 1:
        flag = 1
        break

if flag == 1:
    print("Enter correct input")
    
cnt = 0
m = 0
max = 0

for i in range(0, len(arr)):
    if arr[i] == 1:
        cnt = 1
        for j in range(i, len(arr)):
            if arr[j] != 0:
                m = m + 1
            	m = m + cnt
        if m > max:
            max = m  # For each set of consecutive 1s, the maximum value is found here

print("The maximum no. of consecutive 1's is:", max)