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