def INT(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) S = list(input()) if S[-1] == "0": S[-1] = "1" else: S[-1] = "0" print("".join(S))