S = int(input()) N = S[len(S)-1:] K = S[:0] if K[0] == "x": T =2**32 - N print(T) else: print(S)