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); 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 { out: for (int i = size; i < n; i++) { List ee = new ArrayList<>(e); if (size % 2 == 0) { for (int j = 0; j < size; j += 2) { if (ee.get(j) > ee.get(i)) { continue out; } } int tmp = ee.get(size); ee.set(size, ee.get(i)); ee.set(i, tmp); ee.set(n, ee.get(n) + 1); } else { if (ee.get(size - 1) > ee.get(i)) { continue out; } int tmp = ee.get(size); ee.set(size, ee.get(i)); ee.set(i, tmp); ee.set(n, ee.get(n) + 1); } st.push(ee); } } } // pr.println(cnt); pr.println(max); } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes())); pr = new Printer(System.out); solve(); // pr.close(); pr.flush(); // sc.close(); } static String INPUT = null; private static class Printer extends PrintWriter { Printer(OutputStream out) { super(out); } } }