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