#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10, LG = 45;
long long n, ts, Mx, B[N], S[N];
struct Node {
  int32_t l, r, c;
  Node() { l = r = c = 0; }
};
vector<Node> A;
inline long long Creat() { return (ts++); }
inline void Add(long long val, long long tp) {
  long long id = 0;
  A[id].c += tp;
  for (long long i = LG - 1; ~i; i--) {
    bool b = (val >> i) & 1;
    if (!A[id].l) A[id].l = Creat();
    if (!A[id].r) A[id].r = Creat();
    if (!b) id = A[id].l;
    if (b) id = A[id].r;
    A[id].c += tp;
  }
}
inline long long Get(long long val) {
  long long id = 0, ret = 0;
  for (long long i = LG - 1; ~i; i--) {
    if (!A[id].l) A[id].l = Creat();
    if (!A[id].r) A[id].r = Creat();
    bool b = (val >> i) & 1, w = 0;
    if ((!b && A[A[id].r].c) || (b && !A[A[id].l].c))
      id = A[id].r, ret |= (1ll << i), w = 1;
    if (!w) id = A[id].l;
  }
  return (val ^ ret);
}
int32_t main() {
  scanf("%lld", &n);
  A.resize(2e7, Node());
  Creat();
  Add(0, 2);
  for (long long i = 1; i <= n; i++) scanf("%lld", &B[i]);
  for (long long i = n; i; i--) S[i] = S[i + 1] ^ B[i], Add(S[i], 1);
  for (long long i = 0, r = 0; i <= n; i++, r ^= B[i])
    Mx = max(Mx, Get(r)), Add(S[i + 1], -1);
  return !printf("%lld", Mx);
}
