#include <bits/stdc++.h>
using namespace std;
const long long ONE = 1;
struct trie {
  trie* node[2];
  int count;
  trie() : count(0) {
    node[0] = NULL;
    node[1] = NULL;
  }
};
void ModifyTrie(trie* root, long long x, int p) {
  if (!root) return;
  trie* temp = root;
  bool b;
  for (int i = 41; i >= 0; i--) {
    b = x & (ONE << i);
    if (!temp->node[b]) temp->node[b] = new trie();
    temp = temp->node[b];
    temp->count = temp->count + p;
  }
  temp->count = temp->count + p;
  return;
}
long long XORTrie(trie* root, long long x) {
  long long xorResult = 0;
  trie* temp = root;
  bool b;
  for (int i = 41; i >= 0; i--) {
    b = x & (ONE << i);
    if (temp->node[1 - b] && temp->node[1 - b]->count > 0) {
      xorResult = (xorResult << 1) + 1;
      temp = temp->node[1 - b];
    } else if (temp->node[b] && temp->node[b]->count > 0) {
      xorResult = xorResult << 1;
      temp = temp->node[b];
    }
  }
  return xorResult;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  long long arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  trie* root = new trie();
  long long suffix = 0;
  ModifyTrie(root, suffix, 1);
  for (int i = n - 1; i >= 0; i--) {
    suffix = suffix ^ arr[i];
    ModifyTrie(root, suffix, 1);
  }
  long long maxXor = 0;
  long long prefix = 0;
  long long newval = XORTrie(root, prefix);
  if (maxXor < newval) maxXor = newval;
  for (int i = 0; i <= n; i++) {
    prefix = prefix ^ arr[i];
    ModifyTrie(root, suffix, -1);
    suffix = suffix ^ arr[i];
    newval = XORTrie(root, prefix);
    if (maxXor < newval) maxXor = newval;
  }
  cout << maxXor << endl;
  return 0;
}
