#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long long INFL = LLONG_MAX;
const long double pi = acos(-1);
int N;
long long A[100100];
int nextNode[4001001][2];
int z = 1;
int add(long long mask) {
  int node = 1;
  for (int i = 0; i < 40; i++) {
    int which = nextNode[node][(mask >> (39 - i)) & 1];
    if (which == 0) {
      z++;
      nextNode[node][(mask >> (39 - i)) & 1] = z;
      which = z;
    }
    node = which;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(15);
  cout << fixed;
  cout.tie(0);
  cin.tie(0);
  cin >> N;
  for (int(i) = 1, j123 = N; (i) <= j123; (i)++) cin >> A[i];
  long long suff = 0;
  long long pref = 0;
  long long tot = 0;
  for (int(i) = 1, j123 = N; (i) <= j123; (i)++) pref ^= A[i];
  tot = pref;
  long long ans = tot;
  add(0);
  for (int i = N; i >= 0; i--) {
    long long cur = pref;
    int node = 1;
    long long res = 0;
    for (int ii = 0; ii < 40; ii++) {
      int bit = (pref >> (39 - ii)) & 1;
      int which = nextNode[node][1 - bit];
      if (which == 0) {
        which = nextNode[node][bit];
        cur &= (~(1ll << (39 - ii)));
        res = (res << 1) | bit;
      } else {
        res = (res << 1) | (1 ^ bit);
      }
      node = which;
    }
    ans = max(res ^ pref, ans);
    pref ^= A[i];
    suff ^= A[i];
    add(suff);
  }
  cout << ans << '\n';
}
