list1 = []

num = int(input("Enter the number"))  
count = 0  

n = len(num)  

for i in range(0, n-1):  
    if num[i] == 1:  
        list1[i] = count++
    else:  
        break  

print(max(list1))