import sys input = sys.stdin.readline S=list(int(input())) if S[-1]=="0": S[-1]="1" else: S[-1]="0" print("".join(S))