s = [*map(int, list(input()))] s[-1] = (s[-1] + 1) % 2 print(*s, sep="")