n=input() if n[0]=="x": print(2**32-int(n[1:])) else: print(n)