S = int(input()) K = f"{S}" N = repr(S.lstrip()) if K[0] == "x": T =2**32 - N print(T) else: print(S)