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