#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 55;
pair<long long, int> trie[N * 70][2];
long long sum[N];
long long a[N];
int root;
int counter = 1;
void ins(int node, int bet, long long x, int val) {
  if (bet < 0) return;
  bool b = (x & (1LL << bet));
  if (trie[node][b].first == 0) trie[node][b].first = counter++;
  trie[node][b].second += val;
  ins(trie[node][b].first, bet - 1, x, val);
}
long long fnd(int node, int bet, long long x) {
  if (bet < 0) return 0;
  bool b = (x & (1LL << bet));
  if (b) {
    if (trie[node][0].second != 0)
      return fnd(trie[node][0].first, bet - 1, x) + (1LL << bet);
    if (trie[node][1].second != 0) return fnd(trie[node][1].first, bet - 1, x);
    assert(0);
  } else {
    if (trie[node][1].second != 0)
      return fnd(trie[node][1].first, bet - 1, x) + (1LL << bet);
    if (trie[node][0].second != 0) return fnd(trie[node][0].first, bet - 1, x);
    return 0;
  }
}
int main() {
  root = counter++;
  int n;
  cin >> n;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum[i] = a[i];
    if (i) sum[i] ^= sum[i - 1];
    ans = max(ans, sum[i]);
    ins(root, 41, sum[i], +1);
  }
  ins(root, 41, 0, +1);
  long long x = 0;
  for (int i = n - 1; i >= 0; i--) {
    ins(root, 41, sum[i], -1);
    x ^= a[i];
    ans = max(ans, fnd(root, 41, x));
  }
  ans = max(ans, fnd(root, 41, x));
  cout << ans << endl;
  return 0;
}
