There are N students. The power of each student is a small non-negative integer.
You want to split the students into three teams for a Trisle match. Every student belongs to exactly one team, and no team may be empty. Once the teams are fixed, the power of a team is the XOR of the powers of its members.
Hongjun calls the sum of the three team powers the greatness of the split. He wants to know how large that value can get. Write a program that finds the maximum possible greatness.
Input
The first line contains the number of students N. (3≤N≤100)
The second line contains the powers of the students X1,X2,…,XN, separated by spaces. (0≤Xi≤255)
Output
Print the maximum possible greatness on the first line.
Hint
Suppose four students have powers 7, 3, 5 and 2. Put the student with power 7 alone on one team, the student with power 3 alone on another, and the remaining two students together. The greatness is then 7+3+(5⊕2)=17.