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