def main(): z = input() if z[0] == 'x': print(2**32-int(z[1:])) else: print(z) if __name__ == '__main__': main()