ans=0 s=input() for x in s[1:]: if x!="0": ans+=1 print(ans)