input_score = input() if input_score[0] == "x": print(2**32 - int(input_score[0:])) else: print(input_score)