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