#include <bits/stdc++.h>
using namespace std;
struct Trie {
  Trie* children[2];
  Trie() {
    for (int i = 0; i < 2; ++i) {
      children[i] = NULL;
    }
  }
};
long long a[100005];
Trie* root;
stack<int> binaryPresentation(long long x) {
  stack<int> stk;
  while (x) {
    int temp = x % 2;
    stk.push(temp);
    x /= 2;
  }
  while (stk.size() < 45) {
    stk.push(0);
  }
  return stk;
}
void insertTrie(long long val) {
  Trie* current = root;
  stack<int> stk = binaryPresentation(val);
  while (!stk.empty()) {
    int t = stk.top();
    stk.pop();
    if (current->children[t] == NULL) {
      current->children[t] = new Trie;
    }
    current = current->children[t];
  }
}
long long queryTrie(long long cur) {
  long long result = 0;
  Trie* current = root;
  stack<int> stk = binaryPresentation(cur);
  while (!stk.empty()) {
    int t = stk.top();
    stk.pop();
    if (current->children[1 - t] == NULL) {
      current = current->children[t];
      result *= 2;
    } else {
      current = current->children[1 - t];
      result *= 2;
      result += 1;
    }
  }
  return result;
}
int main() {
  int n;
  long long xors = 0, prefix = 0, result = 0;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    xors ^= a[i];
  }
  root = new Trie;
  insertTrie(prefix);
  for (int i = 1; i <= n; ++i) {
    prefix ^= a[i];
    insertTrie(prefix);
    result = max(result, queryTrie(prefix ^ xors));
  }
  cout << result << endl;
  return 0;
}
