C = list(input()) N = len(C) ans = 0 ii = 1 while True: if ii > N-1: break if ii <= N-1: if C[ii] != '0': ans += 1 ii += 1 print(ans)