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