S = [int(c) for c in input()] S[-1] = 1 - S[-1] print("".join([str(c) for c in S]))