N=(input()) M=int(N[1:]) if N.startswith("x"): print(4294967296-M) elif not N:print(N) else: print(N)