L1 = input()
list1 = list(L1)

count = 0
onecount = []

for ele in list1:
    if ele == 1:
        count += 1
    else:
        if count > 0:
            onecount.append(count)
        count = 0

max_count = max(onecount)
print(max_count)