N = input()[1:-1] print(abs(8 - len(N)))