#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
ostream& operator<<(ostream& out, const pair<A, B>& a) {
  return out << "(" << a.first << ", " << a.second << ")";
}
const int MAXLOG = 42;
long long int max(long long int x, long long int y) {
  if (x > y) return x;
  return y;
}
typedef struct node {
  node *left, *right;
  int data;
} node;
node* generate(long long int key) {
  node* n = new node;
  n->left = NULL;
  n->right = NULL;
  n->data = key;
  return n;
}
node* insert(node* root, long long int n, long long int level = MAXLOG) {
  long long int a = (n >> (level + 1)) & 1;
  if (root == NULL) root = generate(a);
  if (level >= 0) {
    long long int b = (n >> (level)) & 1;
    if (b) {
      root->right = insert(root->right, n, level - 1);
    } else {
      root->left = insert(root->left, n, level - 1);
    }
  }
  return root;
}
long long int query(node* root, long long int n, long long int level = MAXLOG) {
  long long int count = 0;
  if (root == NULL) return 0;
  if (level < 0) return 0;
  long long int a = (n >> level) & 1;
  if (a) {
    if (root->left) {
      count += ((long long int)1 << level);
      count += query(root->left, n, level - 1);
    } else {
      count += query(root->right, n, level - 1);
    }
  } else {
    if (root->right) {
      count += ((long long int)1 << level);
      count += query(root->right, n, level - 1);
    } else
      count += query(root->left, n, level - 1);
  }
  return count;
}
int main() {
  {
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
  };
  node* root = NULL;
  int n;
  cin >> n;
  vector<long long int> v(n + 1), x(n + 1), y(n + 1);
  v[0] = 0;
  for (long long int i = 1; i < v.size(); i++) cin >> v[i];
  x[0] = v[0];
  y[v.size() - 1] = v[v.size() - 1];
  for (long long int i = 1; i < v.size(); i++) x[i] = x[i - 1] ^ v[i];
  for (long long int i = ((int)v.size()) - 2; i >= 0; i--)
    y[i] = y[i + 1] ^ v[i];
  long long int max1 = 0;
  for (long long int i = 0; i < v.size(); i++) {
    max1 = max(max1, x[i]);
    max1 = max(max1, y[i]);
    long long int a = query(root, y[i]);
    root = insert(root, x[i]);
    max1 = max(max1, a);
  }
  cout << max1 << endl;
  return 0;
}
