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