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