def main(): number = input() if number == "1" or number[0] != "1" or int(number) % 2 != 1: print(-1) else: print(len(str(number)) - 1) if __name__ == "__main__": main()