s = list(input()) if s[-1] == "0": s[-1] = "1" elif s[-1] == "1": s[-1] = "0" print(*s, sep="")