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