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