#include <bits/stdc++.h>
using namespace std;
int to[2][4000005];
int cnt[4000005];
long long pref[100005];
long long arr[100005];
long long pw[40];
long long ans;
int sz;
int n;
void pre() {
  pw[0] = 1;
  for (int i = 1; i < 40; ++i) {
    pw[i] = (pw[i - 1] << 1);
  }
}
bool bit(long long x, int ps) { return x & pw[ps]; }
void addEl(long long x) {
  int v = 0;
  for (int i = 39; i >= 0; --i) {
    bool r = bit(x, i);
    if (!to[r][v]) {
      to[r][v] = ++sz;
    }
    v = to[r][v];
    ++cnt[v];
  }
}
void delEl(long long x) {
  int v = 0;
  for (int i = 39; i >= 0; --i) {
    bool r = bit(x, i);
    v = to[r][v];
    --cnt[v];
  }
}
long long calc(long long x) {
  long long ret = 0;
  int v = 0;
  for (int i = 39; i >= 0; --i) {
    bool r = bit(x, i);
    if (!to[r][v]) {
      r ^= 1;
      if (!to[r][v]) {
        return ret;
      }
    }
    ret += r * pw[i];
    v = to[r][v];
  }
  return ret;
}
void solve() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", &arr[i]);
  }
  for (int i = 1; i <= n; ++i) {
    pref[i] = (pref[i - 1] ^ arr[i]);
    ans = max(ans, pref[i]);
    addEl(pref[i]);
  }
  long long cur = 0;
  for (int i = n; i > 0; --i) {
    cur ^= arr[i];
    delEl(pref[i]);
    ans = max(ans, cur ^ calc(~cur));
  }
  printf("%lld\n", ans);
}
int main() {
  int tt = 1;
  pre();
  while (tt--) {
    solve();
  }
  return 0;
}
