import java.io.*; import java.util.*; public class Main { static int n; static int[] values; static int max = 0; public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); n = sc.nextInt(); values = new int[n]; for (int i = 0; i < n; i++) { values[i] = sc.nextInt(); } check(0, new boolean[n], 0); System.out.println(max); } static void check(int idx, boolean[] used, int v) { if (idx >= n) { max = Math.max(max, v); return; } for (int i = 0; i < n; i++) { if (used[i]) { continue; } used[i] = true; for (int j = i + 1; j < n; j++) { if (used[j]) { continue; } used[j] = true; check(idx + 2, used, v ^ (values[i] + values[j])); used[j] = false; } used[i] = false; break; } } } class Scanner { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(""); public Scanner() throws Exception { } public int nextInt() throws Exception { return Integer.parseInt(next()); } public long nextLong() throws Exception { return Long.parseLong(next()); } public double nextDouble() throws Exception { return Double.parseDouble(next()); } public String next() throws Exception { if (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } }