C = input() X = len(C) for i in range(1, X): # print(C[:i], C[i:]) if C[i:][0] == '0': X -= 1 print(X-1)