#include <bits/stdc++.h>
using namespace std;
const long long MAXK = 42;
struct nd {
  nd *nxt[2];
  nd() { nxt[0] = nxt[1] = nullptr; }
};
void addShit(nd *root, long long x) {
  for (long long i = MAXK - 1; i >= 0; i--) {
    long long v = (x >> i) & 1LL;
    if (root->nxt[v] == nullptr) root->nxt[v] = new nd();
    root = root->nxt[v];
  }
}
long long query(nd *root, long long x) {
  long long ans = 0;
  for (long long i = MAXK - 1; i >= 0; i--) {
    long long v = (x >> i) & 1LL;
    if (root->nxt[v ^ 1] != nullptr) {
      root = root->nxt[v ^ 1];
      ans |= (1LL << i);
    } else
      root = root->nxt[v];
  }
  return ans;
}
long long a[100008];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  long long total = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    total ^= a[i];
  }
  nd *root = new nd();
  addShit(root, 0);
  long long x = 0;
  long long ans = total;
  for (long long i = 1; i <= n; i++) {
    x ^= a[i];
    ans = max(ans, query(root, x ^ total));
    addShit(root, x);
  }
  cout << ans << "\n";
  return 0;
}
