A=input("")
i=1
B=len(A)
while A[-i] != " ":
    i+=1
    if i-1==B:
        break
print(i-1)