n = input().count('0') print(abs(n - 8))