s = input().strip() if not s: print('') # though the problem states S is valid, so this is just a safeguard else: last = s[-1] flipped = '1' if last == '0' else '0' print(s[:-1] + flipped)