Link, a famous bear magician in Bear Institute of Talented(BIT), has recently learned new magic.
That is, given a array $a$ containing $n$ elements $a_{1},...,a_{n}$, and Link can cast the following magic:
Link can choose two integers $l,r$ such that $1\leq l \leq r \leq n$, making all $a_{i}=xor(l,r)$ where $l\leq i\leq r$ and $xor(l,r)$ denotes the bitwise-xor($\oplus$) of all elements in $[l,r]$. More formally, $xor(l,r)=a_l\oplus a_{l+1}\oplus ... \oplus a_r$.
Link can cast this magic any time(possibly, zero) and can choose $l,r$ arbitrarily. However, since Link has a sort of Obsessive-Compulsive Disorder(OCD), he wants all elements to become the same after his operation. Now, he wonders about the maximum of this same value.
What's more, Link finds that the given array has a weird property: there always exists at least one pair of $x,y(x\neq y)$ such that $a_x= a_y$.