#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
long long tot, ans, a[maxn], tree[maxn * 61][2], num[maxn * 61], pre[maxn],
    post[maxn];
void insert(long long x) {
  long long u = 0;
  for (int i = 61; i >= 0; --i) {
    int t = ((1LL << i) & x) ? 1 : 0;
    if (!tree[u][t]) tree[u][t] = ++tot;
    u = tree[u][t];
  }
  num[u] = x;
}
long long query(long long x) {
  long long u = 0;
  for (int i = 61; i >= 0; --i) {
    int t = ((1LL << i) & x) ? 1 : 0;
    if (tree[u][t ^ 1])
      u = tree[u][t ^ 1];
    else
      u = tree[u][t];
  }
  return num[u];
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%lld", &a[i]), pre[i] = pre[i - 1] ^ a[i];
  for (int i = n; i >= 1; --i) post[i] = post[i + 1] ^ a[i];
  for (int i = 0; i <= n; ++i) {
    insert(pre[i]);
    long long temp = query(post[i + 1]);
    ans = max(ans, temp ^ post[i + 1]);
  }
  printf("%lld\n", ans);
}
