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