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.
- Initially, create the sequence .
- While the length of is greater than , repeat the following operation.
- Choose two different positions in the current sequence, and let their values be .
- Remove the two chosen elements and append to the end of the sequence.
- Let be the last remaining element.
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 .
Input
The input is given in the following format.
Output
Print the original integer on the first line.
Constraints
- .
- ().
- .
- The input is given so that there exists an original integer such that and the binary representation of has length .
Subtasks
Samples
Since , we have , so the integer is .
Therefore, .