n = int(input()) A = list(map(int, input().split())) used = [False] * n def dfs(i, x): if 2 * i == n: return x for j in range(n): if not used[j]: used[j] = True a = A[j] break ret = 0 for k in range(j + 1, n): if not used[k]: used[k] = True ret = max(ret, dfs(i + 1, x ^ (a + A[k]))) used[k] = False used[j] = False return ret print(dfs(0, 0))