#yuki671 s=raw_input() zc=s.count('0') print abs(zc-8)