#define _GLIBCXX_DEBUG #include #define ll long long #define REP(i, n) for (ll (i) = 0; (i) < (n); (i)++) #define REPI(i, a, b) for (ll (i) = (a); (i) < (b); (i)++) #define int long long using namespace std; using P = pair; using VI = vector; using VVI = vector; using VVVI = vector; int N; VI A; int dfs(VI& x, int acc) { if (x.size() == 0) { return acc; } int ans = -1; REP (i, x.size()-1) { VI y(x); int tmp = acc ^ (x[i] + x.back()); y.erase(y.begin() + i); y.erase(y.end() - 1); ans = max(ans, dfs(y, tmp)); } return ans; } signed main() { cin >> N; A.resize(N); REP (i, N) { cin >> A[i]; } cout << dfs(A, 0) << endl; }