#abc117d. [abc117_d]XXOR
[abc117_d]XXOR
Problem Statement
You are given non-negative integers and another non-negative integer .
For a integer between and (inclusive), let XOR XOR XOR .
Here, for non-negative integers and , XOR denotes the bitwise exclusive OR of and .
Find the maximum value of .
What is XOR?
The bitwise exclusive OR of and , , is defined as follows:
- When is written in base two, the digit in the 's place () is if, when written in base two, exactly one of and has in the 's place, and otherwise.
For example, XOR . (When written in base two: XOR .)
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the maximum value of .
Sample Input 1
3 7
1 6 3
Sample Output 1
14
The maximum value is: XOR XOR XOR .
Sample Input 2
4 9
7 4 0 3
Sample Output 2
46
Sample Input 3
1 0
1000000000000
Sample Output 3
1000000000000