def checkLights(lights):
    counter = 0
    large_counter = 0
    for i in lights:
        if i == '1':
            counter += 1
            if counter > large_counter:
                large_counter = counter
        else:
            counter = 0
    return large_counter


l = str(input())
print(checkLights(l))

23c08bd2b4d670e5003ad6b8ba5263fc7a14ad59
<mask token>

def checkLights(lights):
    counter = 0
    large_counter = 0
    for i in lights:
        if i == '1':
            counter += 1
            if counter > large_counter:
                large_counter = counter
        else:
            counter = 0
    return large_counter


<mask token>

def checkLights(lights):
    counter = 0
    large_counter = 0
    for i in lights:
        if i == '1':
            counter += 1
            if counter > large_counter:
                large_counter = counter
        else:
            counter = 0
    return large_counter


<mask token>
print(checkLights(l))

def checkLights(lights):
    counter = 0
    large_counter = 0
    for i in lights:
        if i == '1':
            counter += 1
            if counter > large_counter:
                large_counter = counter
        else:
            counter = 0
    return large_counter


l = str(input())
print(checkLights(l))
