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