s=list(input()) j=0 for i in s: if i=="0": j+=1 print(len(s)-j-1)