#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
long long Arr[N];
long long SufXor[N], PreXor[N];
long long Power[100];
struct Node {
  Node *Child[2];
  int Cnt;
  Node() {
    Child[0] = Child[1] = NULL;
    Cnt = 0;
  }
} * Root;
string ToBin(long long x) {
  string Res = "";
  while (x) {
    Res += ((x & 1) + '0');
    x /= 2;
  }
  while (Res.size() < 63) Res.push_back('0');
  reverse(Res.begin(), Res.end());
  return Res;
}
void Add(string s) {
  Node *Cur = Root;
  for (int i = 0; i < s.size(); i++) {
    int idx = s[i] - '0';
    if (!Cur->Child[idx]) Cur->Child[idx] = new Node;
    Cur = Cur->Child[idx];
    Cur->Cnt++;
  }
}
void Remove(string s) {
  Node *Cur = Root;
  for (int i = 0; i < s.size(); i++) {
    int idx = s[i] - '0';
    Cur = Cur->Child[idx];
    Cur->Cnt--;
  }
}
long long GetMax(string s) {
  long long Res = 0;
  Node *Cur = Root;
  for (int i = 0; i < s.size(); i++) {
    bool idx = (s[i] == '1');
    if (Cur->Child[!idx] && Cur->Child[!idx]->Cnt) {
      Res += Power[62 - i];
      Cur = Cur->Child[!idx];
    } else
      Cur = Cur->Child[idx];
  }
  return Res;
}
int main() {
  Root = new Node;
  Add(ToBin(0));
  Power[0] = 1;
  for (int i = 1; i < 63; i++) Power[i] = 2 * Power[i - 1];
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%I64d", Arr + i);
    PreXor[i] = SufXor[i] = Arr[i];
    if (i) PreXor[i] ^= PreXor[i - 1];
    Add(ToBin(PreXor[i]));
  }
  long long Ans = GetMax(ToBin(0));
  for (int i = n - 1; i >= 0; i--) {
    SufXor[i] ^= SufXor[i + 1];
    Remove(ToBin(PreXor[i]));
    Ans = max(Ans, GetMax(ToBin(SufXor[i])));
  }
  printf("%I64d\n", Ans);
  return 0;
}
