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