#include <bits/stdc++.h>
using namespace std;
long long modx(long long Base, long long exponent) {
  long long ans = 1;
  if (Base == 1) return Base;
  while (exponent) {
    if (exponent & 1) ans = (ans * Base) % 1000000007;
    Base = (Base * Base) % 1000000007;
    exponent = exponent >> 1;
  }
  return ans;
}
long long inmodx(long long num) { return (modx(num, 1000000007 - 2LL)); }
bool cmp() {
  bool ans = 0;
  return ans;
}
struct ST_Node {
  ST_Node() {}
  void assign_value_() {}
  void merge_nodes_() {}
};
const int N = (1e5) + 9;
const int M = 45;
const int LOGN = ((int)log2(N)) + 3;
const int LOGM = ((int)log2(M)) + 3;
long long a[N], pre[N], suf[N], p2[M];
pair<int, int> trie_link[N * M];
int cnt, root;
int add_node() {
  trie_link[cnt] = make_pair(0, 0);
  cnt++;
  return (cnt - 1);
}
void add_value(long long n) {
  int i, pt = root, new_node;
  for (i = M - 1; i >= 0; i--) {
    if (p2[i] & n) {
      if (trie_link[pt].second == 0) {
        new_node = add_node();
        trie_link[pt].second = new_node;
      }
      pt = trie_link[pt].second;
    } else {
      if (trie_link[pt].first == 0) {
        new_node = add_node();
        trie_link[pt].first = new_node;
      }
      pt = trie_link[pt].first;
    }
  }
  return;
}
long long max_xor(long long n) {
  int i, pt = root;
  long long ans = 0LL;
  for (i = M - 1; i >= 0; i--) {
    if (n & p2[i]) {
      if (trie_link[pt].first) {
        ans += p2[i];
        pt = trie_link[pt].first;
      } else
        pt = trie_link[pt].second;
    } else {
      if (trie_link[pt].second) {
        ans += p2[i];
        pt = trie_link[pt].second;
      } else
        pt = trie_link[pt].first;
    }
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, i;
  long long ans = 0LL;
  p2[0] = 1LL;
  for (i = (1); i < (M); i++) p2[i] = p2[i - 1] + p2[i - 1];
  cin >> n;
  for (i = (1); i < (n + 1); i++) cin >> a[i];
  pre[0] = 0LL;
  for (i = (1); i < (n + 1); i++) {
    pre[i] = pre[i - 1] ^ a[i];
    ans = max(ans, pre[i]);
  }
  suf[n + 1] = 0LL;
  for (i = n; i > 0; i--) {
    suf[i] = suf[i + 1] ^ a[i];
    ans = max(ans, suf[i]);
  }
  cnt = 1;
  root = add_node();
  for (i = (1); i < (n); i++) {
    add_value(pre[i]);
    ans = max(ans, max_xor(suf[i + 1]));
  }
  cout << ans;
  return 0;
}
