#include <bits/stdc++.h>
using namespace std;
long long one = 1;
struct my_struct {
  struct my_struct *left, *right;
  int count;
  my_struct() : count(0), left(NULL), right(NULL) {}
};
void Insert(my_struct *node, int level, long long xor_val, int inc) {
  if (level < 0) return;
  if ((xor_val & (one << level)) == 0) {
    if (node->left == NULL) node->left = new my_struct();
    node->left->count += inc;
    Insert(node->left, level - 1, xor_val, inc);
  } else {
    if (node->right == NULL) node->right = new my_struct();
    node->right->count += inc;
    Insert(node->right, level - 1, xor_val, inc);
  }
}
long long check(my_struct *node, int level, long long xor_val) {
  if (node == NULL || level < 0) return 0;
  if ((one << level) & xor_val) {
    if (node->left != NULL) {
      if (node->left->count)
        return (one << level) + check(node->left, level - 1, xor_val);
      else
        return check(node->right, level - 1, xor_val);
    } else
      return check(node->right, level - 1, xor_val);
  } else {
    if (node->right != NULL) {
      if (node->right->count)
        return (one << level) + check(node->right, level - 1, xor_val);
      else
        return check(node->left, level - 1, xor_val);
    } else
      return check(node->left, level - 1, xor_val);
  }
}
int main() {
  cin.sync_with_stdio(false);
  my_struct *node = new my_struct();
  int N;
  cin >> N;
  long long a[N], suffix_a[N + 1];
  for (int i = 0; i < N; ++i) cin >> a[i];
  suffix_a[N] = 0;
  Insert(node, 40, 0, 1);
  long long xor_val = 0, maxi = 0;
  for (int i = N - 1; i >= 0; --i) {
    xor_val = (xor_val ^ a[i]);
    suffix_a[i] = xor_val;
    maxi = max(maxi, xor_val);
    Insert(node, 40, xor_val, 1);
  }
  xor_val = 0;
  for (int i = 0; i <= N - 1; ++i) {
    Insert(node, 40, suffix_a[i], -1);
    xor_val = (xor_val ^ a[i]);
    long long value = check(node, 40, xor_val);
    maxi = max(maxi, value);
  }
  cout << maxi << endl;
  return 0;
}
