#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, INF = 1e9 + 7, mod = 1e9 + 7;
int n, sz = 1, go[N * 40][2], cnt[N * 80];
long long a[N], t, cur, ans;
void add(long long num, int cond) {
  int v = 1;
  for (int bit = 40; bit >= 0; bit--) {
    int cur = (num >> bit) & 1;
    if (!go[v][cur]) {
      go[v][cur] = ++sz;
    }
    v = go[v][cur];
    cnt[v] += cond;
  }
}
long long get(long long num) {
  int v = 1;
  long long ans = 0;
  for (int bit = 40; bit >= 0; bit--) {
    int cur = (num >> bit) & 1;
    if (go[v][1 - cur] and cnt[go[v][1 - cur]]) {
      ans |= (1ll << bit);
      v = go[v][1 - cur];
    } else {
      v = go[v][cur];
    }
  }
  return ans;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    t ^= a[i];
  }
  add(cur, 1);
  for (int i = n; i >= 1; i--) {
    cur ^= a[i];
    add(cur, 1);
  }
  cur = 0;
  for (int i = 0; i <= n; i++) {
    cur ^= a[i];
    ans = max(ans, get(cur));
    add(t ^ cur, -1);
  }
  cout << ans;
}
