N = input() print(abs(8-N.count("0")))