N = int(input()) A = list(map(int,input().split())) B = [0]*N C = [] ans = 0 def dfs(n): global ans if n==N: cnt = 0 for k in range(len(C)): cnt = cnt^C[k] ans = max(ans,cnt) return ind0 = B.index(0) for ind1 in range(ind0+1,N): if B[ind1]==0: C.append(A[ind0]+A[ind1]) B[ind0] = 1 B[ind1] = 1 dfs(n+2) B[ind0] = 0 B[ind1] = 0 C.pop() dfs(0) print(ans)