s = input() if s[0] == 'x': s = s.lstrip('x') print(-(int(s) - (1<<32))) else: print(s)