#include <bits/stdc++.h>
using namespace std;
const int inv = numeric_limits<int>::max();
const int minv = numeric_limits<int>::min();
const int max_n = 100010;
int n;
long long A[max_n];
long long pxor[max_n];
long long sxor[max_n];
struct node {
  node* p[2];
};
node* root;
void initT() {
  root = new node;
  root->p[0] = NULL;
  root->p[1] = NULL;
}
void insT(node* c, int b, long long suff) {
  if (b == -1) return;
  int currbit = ((suff >> b) % 2);
  if (c->p[currbit] == NULL) {
    c->p[currbit] = new node;
    c->p[currbit]->p[0] = NULL;
    c->p[currbit]->p[1] = NULL;
  }
  insT(c->p[currbit], b - 1, suff);
}
long long solT(node* c, int b, long long pref) {
  if (b == -1) return 0ll;
  int currbit = ((pref >> b) % 2);
  int desbit = 1 - currbit;
  if (c->p[desbit] == NULL)
    return solT(c->p[currbit], b - 1, pref);
  else
    return (1ll << b) + solT(c->p[desbit], b - 1, pref);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) cin >> A[i];
  pxor[0] = 0;
  for (int i = 1; i < n + 1; ++i) pxor[i] = pxor[i - 1] ^ A[i - 1];
  sxor[n] = 0;
  for (int i = n - 1; i > -1; --i) sxor[i] = sxor[i + 1] ^ A[i];
  initT();
  long long res = 0;
  for (int i = n; i > -1; --i) {
    insT(root, 39, sxor[i]);
    res = max(res, solT(root, 39, pxor[i]));
  }
  cout << res << endl;
  return 0;
}
