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