n = int(input()) n = str(n) print(len(n)-1-n.count("0"))