#include <bits/stdc++.h>
using namespace std;
const int Maxn = 100001;
struct Tree {
  Tree* Next[2];
} T[Maxn * 64], *Root;
int N, Cnt;
long long Sum, Ans, A[Maxn];
void Print() { cout << Ans << endl; }
long long Find(long long x) {
  int len = 0, tmp[64] = {0};
  for (long long t = x; t; t >>= 1) tmp[len++] = t & 1;
  Tree* p = Root;
  for (int i = 63; i >= 0; --i) {
    if (p->Next[!tmp[i]])
      p = p->Next[!tmp[i]], tmp[i] = 1;
    else
      p = p->Next[tmp[i]], tmp[i] = 0;
  }
  long long tx = 0, ti = 1;
  for (int i = 0; i <= 63; ++i) tx += ti * tmp[i], ti *= 2;
  return tx;
}
void Solve() {
  long long tmp = 0;
  for (int i = N; i >= 1; --i) {
    tmp ^= A[i];
    Ans = max(Ans, Find(tmp));
  }
}
void Insert(long long x) {
  int len = 0, tmp[64] = {0};
  for (long long t = x; t; t >>= 1) tmp[len++] = t & 1;
  Tree* p = Root;
  for (int i = 63; i >= 0; --i) {
    if (p->Next[tmp[i]])
      p = p->Next[tmp[i]];
    else {
      p->Next[tmp[i]] = &T[Cnt++];
      p = p->Next[tmp[i]];
    }
  }
}
void Init() {
  Root = &T[Cnt++];
  Insert(Sum);
  cin >> N;
  for (int i = 1; i <= N; ++i) cin >> A[i], Sum ^= A[i], Insert(Sum);
}
int main() {
  Init();
  Solve();
  Print();
  return 0;
}
