import sys readline=sys.stdin.readline S=list(map(int,list(readline().rstrip()))) S[-1]^=1 print(*S,sep="")