def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) mod=10**9+7 def main(): C=input() ans=0 for i in range(len(C)-1): if C[i+1]!="0": ans+=1 print(ans) main()