#include <bits/stdc++.h>
int n;
long long a[100111];
int i, k;
long long re, x, y, j, ans;
struct node {
  node *nxt[2];
  node() { nxt[0] = nxt[1] = NULL; }
} * rt;
inline void insert(long long a, node *p = rt) {
  for (j = 40ll; j >= 0ll; --j) {
    k = ((a & (1ll << j)) ? 1 : 0);
    if (!p->nxt[k]) p->nxt[k] = new node();
    p = p->nxt[k];
  }
}
inline long long get(long long a, node *p = rt) {
  re = 0ll;
  for (j = 40ll; j >= 0ll; --j) {
    k = ((a & (1ll << j)) ? 0 : 1);
    if (p->nxt[k]) {
      p = p->nxt[k];
      re |= (1ll << j);
    } else
      p = p->nxt[k ^ 1];
  }
  return re;
}
int main() {
  scanf("%d", &n);
  for (i = 0; i < n; ++i) scanf("%I64d", a + i);
  ans = std::max(a[0], a[n - 1]);
  rt = new node();
  insert(0ll);
  for (i = 0; i < n; ++i) x ^= a[i];
  ans = std::max(ans, x);
  for (i = n - 1, y = 0ll; i >= 0; --i) {
    x ^= a[i];
    y ^= a[i];
    insert(y);
    ans = std::max(ans, get(x));
  }
  printf("%I64d\n", ans);
  return 0;
}
