A = list(input().split(" "))
for i in range(len(A)):
    if A[i]!='0':
        break
    else:
        i+=1
print(i+1)