import sys input=lambda: sys.stdin.readline().rstrip() C=input() ans=0 n=len(C) for i in range(1,n): if C[i]!="0": ans+=1 print(ans)