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