N1 = list(input()) N2 =['0','0','0','0','0','0','0','0'] N1 = N1[1:] N1 = N1[:-1] print(abs(len(N2) - len(N1)))