#include <bits/stdc++.h>
using namespace std;
const long long maxn = 300100, mod = 1e9 + 7, maxa = 3e6 + 100, maxb = 42;
const long long inf = 2e18 + 13;
long long max(long long x, long long y) { return (x > y ? x : y); }
long long min(long long x, long long y) { return (x < y ? x : y); }
long long num = 1;
long long trie[maxn * maxb][2];
long long a[maxn];
void add(long long x) {
  long long v = 0;
  for (long long i = maxb - 1; i >= 0; i--) {
    bool bit = (x >> i) & 1;
    if (!trie[v][bit]) {
      trie[v][bit] = num++;
    }
    v = trie[v][bit];
  }
}
long long get(long long x) {
  long long v = 0;
  long long ans = 0;
  for (long long i = maxb - 1; i >= 0; i--) {
    bool bit = (x >> i) & 1;
    ans *= 2;
    if (trie[v][!bit]) {
      ans++;
      v = trie[v][!bit];
      continue;
    }
    v = trie[v][bit];
  }
  return ans;
}
int32_t main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, ans = 0, px = 0, sx = 0;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    px ^= a[i];
  }
  for (long long i = n - 1; i >= 0; i--) {
    add(sx);
    ans = max(ans, get(px));
    sx ^= a[i];
    px ^= a[i];
  }
  add(sx);
  ans = max(ans, get(0));
  cout << ans << endl;
  return 0;
}
