s = input() if s[0] == "x": print(2**32-int(s.replace("x",""))) else: print(s)