from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline S = list(input())[:-1] S[-1] = str(1 - int(S[-1])) print(''.join(S))