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