#include <bits/stdc++.h>
using namespace std;
const long long sz = 1e5 + 10, lim = 40, root = 0;
long long ara[sz], preXor[sz];
int trie[sz * (lim + 2)][2], node;
void add(long long num) {
  int cur = root;
  for (int i = 40; i >= 0; i--) {
    bool bit = (num >> i) & 1;
    if (trie[cur][bit] == -1) trie[cur][bit] = ++node;
    cur = trie[cur][bit];
  }
}
long long calc(long long num) {
  int cur = root;
  long long ret = 0;
  for (int i = 40; i >= 0; i--) {
    bool bit = (num >> i) & 1;
    if (trie[cur][bit ^ 1] != -1) {
      ret = (ret << 1) | 1;
      cur = trie[cur][bit ^ 1];
    } else {
      ret <<= 1;
      cur = trie[cur][bit];
    }
  }
  return ret;
}
int main() {
  memset(trie, -1, sizeof(trie));
  long long n, ans = 0, suf = 0;
  cin >> n;
  for (long long i = 1; i <= n; ++i)
    scanf("%lld", &ara[i]), preXor[i] = preXor[i - 1] ^ ara[i];
  for (long long i = n; i >= 1; --i) {
    ans = max(ans, preXor[i]);
    if (i != n) ans = max(ans, calc(preXor[i]));
    suf ^= ara[i];
    add(suf);
    ans = max(ans, suf);
  }
  cout << ans << '\n';
  return 0;
}
