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