S = list(input()) if S[-1]=='0': S[-1] = '1' else: S[-1] = '0' print(*S,sep='')