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