a=list(input().split(" "))
i=1
for ai in a:
    if ai!="0":
        break
    else:
        i+=1
print(i)