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