C = input() N = len(C) ans = N - 1 - C.count('0') print(ans)