#include <bits/stdc++.h>
using namespace std;
const int MAXB = 40;
int n;
long long a[100005];
long long pref[100005];
struct trie {
  struct trie *child[2];
};
struct trie *init() {
  struct trie *node = NULL;
  node = (struct trie *)malloc(sizeof(struct trie));
  node->child[0] = node->child[1] = NULL;
  return node;
}
void add(struct trie *root, long long num) {
  struct trie *node = root;
  for (int i = MAXB; i >= 0; i--) {
    int idx = (num >> i) & 1;
    if (!node->child[idx]) {
      node->child[idx] = init();
    }
    node = node->child[idx];
  }
}
long long search(struct trie *root, int bit, long long num) {
  if (bit < 0) return 0;
  long long ret = 0;
  int idx = (num >> bit) & 1;
  if (root->child[1 - idx]) {
    ret += (1LL << bit);
    ret += search(root->child[1 - idx], bit - 1, num);
  } else {
    ret += search(root->child[idx], bit - 1, num);
  }
  return ret;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    pref[i] = pref[i - 1] ^ a[i];
  }
  struct trie *root = init();
  long long suff = 0;
  long long ans = 0;
  for (int i = n; i >= 0; i--) {
    suff ^= a[i + 1];
    add(root, suff);
    long long best = search(root, MAXB, pref[i]);
    ans = max(ans, best);
  }
  cout << ans << endl;
}
