c = input() ans = 0 for i in range(len(c)): if c[i] != 0: ans += 1 print(ans-1)