#include <bits/stdc++.h>
using namespace std;
long long v[100050], fim[45 * 100050], ans, pref[100050];
int n, trie[45 * 100050][2], node = 0;
inline void add(long long x) {
  int root = 0;
  for (long long i = 44; i >= 0; i--) {
    int prox = ((x & (1LL << i)) ? 1 : 0);
    if (!trie[root][prox]) trie[root][prox] = ++node;
    root = trie[root][prox];
  }
  fim[root] = x;
}
inline long long maximize(long long A) {
  int root = 0;
  for (long long i = 44; i >= 0; i--) {
    int prox = ((A & (1LL << i)) ? 1 : 0);
    if (trie[root][!prox])
      root = trie[root][!prox];
    else
      root = trie[root][prox];
  }
  return fim[root];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  add(0);
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
    pref[i] = (v[i] ^ pref[i - 1]);
  }
  for (int i = 1; i <= n; i++) {
    add(pref[i]);
    ans = max(ans, maximize(pref[n] ^ pref[i]) ^ (pref[n] ^ pref[i]));
  }
  cout << ans << "\n";
}
