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