n=len('00000000') m=len(input()[1:-1]) print(abs(n-m))