#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1e5 + 10;
const int INF = 0x3f3f3f3f;
const int base = 64;
const unsigned long long seed = 133;
const double PI = acos(-1.0);
long long n;
long long Next[Maxn * 50][2], cnt;
long long pre[Maxn], suf[Maxn];
long long a[Maxn];
void init() {
  cnt = 0;
  memset(Next, 0, sizeof(Next));
}
void Insert(long long k) {
  bitset<base> bit = k;
  int p = 0;
  for (int i = 63; i >= 0; i--) {
    int id = bit[i];
    if (!Next[p][id]) Next[p][id] = ++cnt;
    p = Next[p][id];
  }
}
long long Find(long long k) {
  bitset<base> bit = k;
  int p = 0;
  long long ans = 0;
  for (int i = 63; i >= 0; i--) {
    int id = bit[i];
    if (Next[p][id ^ 1]) {
      p = Next[p][id ^ 1];
      id = id ^ 1;
    } else
      p = Next[p][id];
    ans += (1ll * (id)) << i;
  }
  return ans;
}
int main() {
  cin >> n;
  init();
  pre[0] = 0;
  suf[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    pre[i] = pre[i - 1] ^ a[i];
  }
  for (int i = n; i >= 1; i--) suf[i] = suf[i + 1] ^ a[i];
  long long ans = 0, tmp = 0;
  for (int i = 0; i <= n + 1; i++) {
    Insert(pre[i]);
    tmp = Find(suf[i + 1]);
    ans = max(ans, tmp ^ suf[i + 1]);
  }
  cout << ans << endl;
  return 0;
}
