n = list(input().split()) count = 0 for idx in range(len(n)): if n[idx] == '0': count = count + 1 a = [count - 8] print("\n".join(map(str, a)))