t = int(input()) if t< 2147483648: print(t) else: t= 4294967296-t print(t)