import collections number = input() list = len(list(number)) count = 8 - list print(abs(count))