s = list(input())
if s[-1] == '0':
	s[-1] = '1'
else:
	s[-1] = '0'
print("".join(s))