s = list(map(bool, map(int, list(input())))) s[-1] = not s[-1] print("".join(map(str, map(int, s))))