C = input() print(len(C) - C.count("0") - 1)