S = list(map(int,input())) S[-1] ^= 1 print(*S,sep="")