N = input() a = len('1000000007') print(abs(len(N) - a))