import java.io.*; import java.util.*; public class Main_yukicoder699_1 { private static Scanner sc; private static Printer pr; private static void solve() { int n = sc.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); } long max = 0; Deque> st = new ArrayDeque<>(); List ltmp = new ArrayList<>(n + 1); for (int i = 0; i < n; i++) { ltmp.add(i); } ltmp.add(1); st.push(ltmp); @SuppressWarnings("unused") int cnt = 0; while (!st.isEmpty()) { List e = st.pop(); int size = e.get(n); if (size >= n) { // pr.println(e); cnt++; long tmp = 0; long tmp2 = 0; for (int i = 0; i < n; i++) { if (i % 2 == 0) { tmp2 += a[e.get(i)]; } else { tmp2 += a[e.get(i)]; tmp ^= tmp2; tmp2 = 0; } } max = Math.max(max, tmp); } else { for (int i = size; i < n; i++) { List ee = new ArrayList<>(e); int tmp = ee.get(size); ee.set(size, ee.get(i)); ee.set(i, tmp); ee.set(n, ee.get(n) + 2); st.push(ee); } } } //