Time limit: 3s
Memory limit: 256MB
Input:
Output:
After a tiring practical test at OOP, Rares is faced with a new challenge. He has to solve the following problem, otherwise he will fail the Programming class.
Let be an array of non-negative integers. Find the maximum value of , where . Here represents the bitwise xor operation.
Help Rares save his GPA!
Input data
The first line of the input contains (), the size of the given array.
The next line contains non-negative integers , , , ().
Output data
Output a single number, the maximum value of , where .
Constraints and clarifications
- For points, it is guaranteed that ;
- For another points, it is guaranteed that ;
- For the last points, we have ;
Example 1
stdin
6
12 42 2 0 145 7
stdout
6384
Explanation
Rares chooses , , , . The value is .