from itertools import * def popcount(n): cnt = 0 while n: cnt += n & 1 n //= 2 return cnt N = int(input()) A = list(map(int, input().split())) ans = 0 N2 = 1 << N for s in range(N2): if popcount(s) != N//2: continue one = [] zero = [] for i in range(N): if (s >> i) & 1: one.append(i) else: zero.append(i) for tup in permutations(one): val = 0 for i in range(N//2): val ^= A[tup[i]] + A[zero[i]] ans = max(ans, val) print(ans)