#include <bits/stdc++.h>
using namespace std;
const int MAX = 100003;
const int MOD = 1000000007;
long long arr[MAX];
struct trie {
  trie *node[2];
  trie() { node[0] = node[1] = nullptr; }
} * root;
void update(long long suffXor) {
  int bitNo = 40;
  long long bit = 0;
  trie *curr = root;
  while (bitNo >= 0) {
    bit = (suffXor >> bitNo) & 1;
    if (curr->node[bit] == nullptr) curr->node[bit] = new trie;
    curr = curr->node[bit];
    --bitNo;
  }
}
long long query(long long val) {
  int bitNo = 40;
  long long bit = 0;
  trie *curr = root;
  long long res = val;
  while (bitNo >= 0) {
    bit = (val >> bitNo) & 1;
    if (curr->node[bit ^ 1] != nullptr) {
      curr = curr->node[bit ^ 1];
      if (bit == 0ll) {
        res ^= (1ll << bitNo);
      }
    } else {
      curr = curr->node[bit];
      if (bit == 1ll) {
        res ^= (1ll << bitNo);
      }
    }
    --bitNo;
  }
  return res;
}
void solve() {
  int n;
  cin >> n;
  long long preXor = 0;
  long long ans = 0;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    preXor ^= arr[i];
    ans = max(ans, preXor);
  }
  root = new trie;
  long long suffXor = 0;
  for (int i = n - 1; i >= 0; --i) {
    suffXor ^= arr[i];
    preXor ^= arr[i];
    update(suffXor);
    ans = max(ans, query(preXor));
    ans = max(ans, suffXor);
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
