#include <bits/stdc++.h>
using namespace std;
long long one = 1;
struct trie {
  int ct;
  struct trie *left, *right;
  trie() : ct(0), left(NULL), right(NULL) {}
};
void Insert(trie *root, int level, long long x, int change) {
  if (level < 0) return;
  if ((x & (one << level)) == 0) {
    if (root->left == NULL) root->left = new trie();
    root->left->ct += change;
    Insert(root->left, level - 1, x, change);
  } else {
    if (root->right == NULL) root->right = new trie();
    root->right->ct += change;
    Insert(root->right, level - 1, x, change);
  }
}
long long query(trie *root, int level, long long x) {
  if (root == NULL) return 0;
  if (level < 0) return 0;
  if ((one << level) & x) {
    if (root->left != NULL) {
      if (root->left->ct)
        return (one << level) + query(root->left, level - 1, x);
      else
        return query(root->right, level - 1, x);
    } else
      return query(root->right, level - 1, x);
  } else {
    if (root->right != NULL) {
      if (root->right->ct)
        return (one << level) + query(root->right, level - 1, x);
      else
        return query(root->left, level - 1, x);
    } else
      return query(root->left, level - 1, x);
  }
}
int main() {
  trie *root = new trie();
  cin.sync_with_stdio(false);
  int N;
  cin >> N;
  long long Array[N];
  for (int i = 0; i < N; ++i) cin >> Array[i];
  long long sufffix[N + 1];
  sufffix[N] = 0;
  Insert(root, 40, 0, 1);
  long long xr = 0;
  long long Ans = 0;
  for (int i = N - 1; i >= 0; --i) {
    xr = (xr ^ Array[i]);
    sufffix[i] = xr;
    Ans = max(Ans, xr);
    Insert(root, 40, xr, 1);
  }
  xr = 0;
  for (int i = 0; i <= N - 1; ++i) {
    Insert(root, 40, sufffix[i], -1);
    xr = (xr ^ Array[i]);
    long long value = query(root, 40, xr);
    Ans = max(Ans, value);
  }
  cout << Ans << endl;
  return 0;
}
