#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 3;
int n;
long long a[N], P[N];
long long res = 0;
struct Trie {
  int nxt[2];
} T[N * 42];
int cnt = 0;
void add(long long x) {
  int u = 0;
  for (int i = 40; i >= 0; i--) {
    int k = (x >> i) & 1;
    if (T[u].nxt[k] == 0) T[u].nxt[k] = ++cnt;
    u = T[u].nxt[k];
  }
}
long long query(long long x) {
  int u = 0;
  long long res = 0;
  for (int i = 40; i >= 0; i--) {
    int k = (x >> i) & 1;
    if (T[u].nxt[1 ^ k])
      res = res + (1ll << i), u = T[u].nxt[1 ^ k];
    else
      u = T[u].nxt[k];
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    P[i] = P[i - 1] ^ a[i];
    res = max(res, P[i]);
  }
  long long tmp = 0;
  for (int i = n; i >= 1; i--) {
    tmp = tmp ^ a[i];
    res = max(res, tmp);
    add(tmp);
    res = max(res, query(P[i - 1]));
  }
  cout << res;
}
