#include <bits/stdc++.h>
using namespace std;
const int MX = 1e5 + 9;
const long long mod = 1e9 + 7;
const long long inf = (1ll << 61);
struct node {
  long long sum = 0;
  node *nxt[3];
} * root;
int n;
long long a[MX], p[MX], s[MX];
void add(long long x) {
  node *cur = root;
  for (int i = 45; i >= 0; i--) {
    bool bit = ((1ll << i) & x);
    if (cur->nxt[bit] == NULL) {
      cur->nxt[bit] = new node();
    }
    cur = cur->nxt[bit];
    cur->sum++;
  }
}
long long q(long long x) {
  node *cur = root;
  long long ret = 0;
  for (int i = 45; i >= 0; i--) {
    bool bit = ((1ll << i) & x);
    if (cur->nxt[bit ^ 1] != NULL) {
      ret += (1ll << i);
      cur = cur->nxt[bit ^ 1];
    } else {
      if (cur->nxt[bit] == NULL) break;
      cur = cur->nxt[bit];
    }
  }
  return ret;
}
int main() {
  root = new node();
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  p[1] = a[1];
  s[n] = a[n];
  for (int i = 2; i <= n; i++) p[i] = (p[i - 1] ^ a[i]);
  for (int i = n - 1; i >= 1; i--) s[i] = (s[i + 1] ^ a[i]);
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    ans = max(ans, p[i]);
    ans = max(ans, s[i]);
    ans = max(ans, q(s[i]));
    add(p[i]);
  }
  printf("%lld\n", ans);
}
