#include <bits/stdc++.h>
using namespace std;
const int MAX1 = 1e5 + 7;
const int MAX2 = 2500007;
long long a[MAX1];
long long xorr[MAX1];
long long x, ans;
int trie[MAX2][2];
int nex = 1;
int node[MAX2];
int endnode[MAX2];
string conv(long long x) {
  string s;
  while (x) {
    s += (char)(x % 2 + '0');
    x = x / 2;
  }
  while (s.size() <= 42) s += "0";
  reverse(s.begin(), s.end());
  return s;
}
void trie_ins(string s) {
  int i = 0, v = 0;
  while (i < s.size()) {
    if (trie[v][s[i] - '0'] == 0)
      v = trie[v][s[i++] - '0'] = nex++;
    else
      v = trie[v][s[i++] - '0'];
    node[v]++;
  }
  endnode[v]++;
}
void trie_erase(string s) {
  int i = 0, v = 0;
  while (i < s.size()) {
    v = trie[v][s[i++] - '0'];
    node[v]--;
  }
  endnode[v]--;
}
long long query(string s) {
  int i = 0, v = 0;
  string z;
  while (i < s.size()) {
    int t = s[i++] - '0';
    t = (t ^ 1);
    if (node[trie[v][t]] != 0) {
      z += "1";
      v = trie[v][t];
    } else {
      z += "0";
      v = trie[v][t ^ 1];
    }
  }
  reverse(z.begin(), z.end());
  long long ans = 0;
  for (int i = 0; i < z.size(); i++) ans += (z[i] - '0') * (1LL << i);
  return ans;
}
long long func(int n) {
  trie_ins(conv(0));
  for (int i = n - 1; i >= 0; i--) {
    xorr[i] = xorr[i + 1] ^ a[i];
    trie_ins(conv(xorr[i]));
  }
  ans = query(conv(0));
  for (int i = 0; i < n; i++) {
    x = x ^ a[i];
    trie_erase(conv(xorr[i]));
    ans = max(ans, query(conv(x)));
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  cout << func(n) << endl;
  return 0;
}
