import re num = input() if re.search('x',num): print(2**32-num[1:9]) else: print(num)