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