#include <bits/stdc++.h>
using namespace std;
struct Trie {
  Trie *nx[2];
  int cnt;
  Trie() {
    nx[0] = nx[1] = nullptr;
    cnt = 0;
  }
};
Trie *root;
void ins(long long x) {
  Trie *now = root;
  for (int bit = 45; bit >= 0; --bit) {
    int p = (x >> bit) & 1LL;
    if (now->nx[p] == nullptr) now->nx[p] = new Trie();
    now = now->nx[p];
    now->cnt++;
  }
}
long long query(long long x) {
  Trie *now = root;
  long long ret = 0LL;
  for (int bit = 45; bit >= 0; --bit) {
    int p = (x >> bit) & 1LL;
    p ^= 1;
    if (now->nx[p] != nullptr && now->nx[p]->cnt > 0) {
      ret += 1LL << bit;
      now = now->nx[p];
    } else {
      now = now->nx[p ^ 1];
    }
    if (now == nullptr || now->cnt == 0) break;
  }
  return ret;
}
const int MXSZ = 1e5;
int n;
long long a[MXSZ + 5];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  root = new Trie();
  cin >> n;
  long long curr = 0LL;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    curr ^= a[i];
    ins(curr);
  }
  long long mx = 0LL;
  mx = max(mx, query(0));
  curr = 0LL;
  for (int i = n; i >= 1; --i) {
    curr ^= a[i];
    mx = max(mx, query(curr));
  }
  cout << mx << '\n';
  return 0;
}
