#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MOD2 = 1e9 + 9;
const int PR = 727;
const int INF = INT_MAX;
const long long LINF = LLONG_MAX;
const int N = 1e5 + 20;
const int K = 41;
long long a[N], trie[K * N][2], n, suf[N], ans, sz = 1;
string i2s(long long x) {
  string res;
  for (long long i = K - 1; i >= 0; i--) res += (x & (1LL << i)) ? '1' : '0';
  return res;
}
long long s2i(string s) {
  long long res = 0;
  for (long long i = 0; i < s.size(); i++)
    res += 1LL * (s[i] == '1') * (1LL << (s.size() - i - 1));
  return res;
}
void add(string s) {
  int v = 0;
  for (char c : s) {
    int nxt = c - '0';
    if (trie[v][nxt] == -1) trie[v][nxt] = sz++;
    v = trie[v][nxt];
  }
}
long long get(string s) {
  string res;
  int v = 0;
  for (char c : s) {
    int x = c - '0';
    if (trie[v][1 - x] + 1) {
      res += '1';
      v = trie[v][1 - x];
    } else {
      res += '0';
      v = trie[v][x];
    }
  }
  return s2i(res);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  memset(trie, -1, sizeof trie);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  suf[n - 1] = a[n - 1];
  for (int i = n - 2; i >= 0; i--) suf[i] = a[i] ^ suf[i + 1];
  long long pre = 0;
  ans = max(ans, suf[0]);
  add(i2s(0));
  pre = a[0];
  for (int i = 1; i <= n; i++) {
    ans = max(ans, get(i2s(suf[i])));
    pre ^= a[i];
    add(i2s(pre));
  }
  cout << ans << endl;
}
