#include <bits/stdc++.h>
inline long long read();
using namespace std;
const int N = 1e5 + 10;
int n, trie[N * 64][2], cnt = 1, rec[N * 64];
long long bk[N], a[N], ans;
inline void insert(long long x) {
  int p = 1;
  for (register int i = 62; i >= 0; i--) {
    bool k = (x & (1ll << i));
    if (!trie[p][k]) trie[p][k] = ++cnt;
    p = trie[p][k];
    rec[p]++;
  }
}
inline void del(long long x) {
  int p = 1;
  for (register int i = 62; i >= 0; i--) {
    bool k = (x & (1ll << i));
    if (!rec[p] or !trie[p][k]) return;
    p = trie[p][k];
    rec[p]--;
  }
}
inline long long search(long long x) {
  int p = 1;
  long long s = 0;
  for (register int i = 62; i >= 0; i--) {
    bool k = (x & (1ll << i));
    s <<= 1ll;
    int &to = trie[p][k ^ 1];
    if (!to or !rec[to]) {
      if (rec[trie[p][k]] and trie[p][k])
        p = trie[p][k];
      else
        break;
    } else
      p = to, s |= 1ll;
  }
  return s;
}
int main() {
  n = read();
  for (register int i = (1); i <= (n); i++) a[i] = read();
  for (register int i = n; i >= 1; i--) bk[i] = bk[i + 1] ^ a[i], insert(bk[i]);
  long long cur = 0;
  ans = search(cur);
  for (register int i = (1); i <= (n); i++) {
    cur ^= a[i];
    del(bk[i]);
    ans = max(ans, search(cur));
  }
  printf("%lld", ans);
  return 0;
}
inline long long read() {
  register long long x = 0;
  register char c = getchar();
  while (!isdigit(c)) c = getchar();
  while (isdigit(c)) x = (x << 3ll) + (x << 1ll) + (c ^ 48), c = getchar();
  return x;
}
