print(eval(input().replace("x","2**32-")))