Let be the length of the binary representation of a positive integer .
You are given a bit string of length . For each , there exists a positive integer such that .
For a positive integer , consider the following process.
The choices of the two elements are arbitrary. The parity of used in this problem is guaranteed to be independent of those choices.
Define a bit string of length as follows.
Let be the integer represented by this binary string, where is the most significant bit and is the least significant bit. The integer satisfies
where denotes the bitwise XOR operation.
Given the bit string and the integer , find the original integer .
The input is given in the following format.
Print the original integer on the first line.
Since , we have , so the integer is .
Therefore, .