print(abs(len(input().strip()) - len('1000000007')))