s = "1000000007" n = input() print(abs(len(n) - len(s)))