#include <bits/stdc++.h>
using namespace std;
const long long len = 40;
long long n, next_free = 0;
long long a[2][200500 * len];
void add(long long x) {
  vector<long long> b;
  long long i;
  for (i = 0; i < len; i++) {
    long long last = x % 2;
    b.push_back(last);
    x /= 2;
  }
  reverse(b.begin(), b.end());
  long long cur = 0;
  for (i = 0; i < len; i++) {
    if (a[b[i]][cur] != 0)
      cur = a[b[i]][cur];
    else {
      next_free++;
      a[b[i]][cur] = next_free;
      cur = next_free;
    }
  }
}
long long get_max(long long x) {
  vector<long long> b;
  long long i;
  for (i = 0; i < len; i++) {
    long long last = x % 2;
    b.push_back(1 - last);
    x /= 2;
  }
  reverse(b.begin(), b.end());
  long long ans = 0;
  long long big = 1;
  for (i = 0; i < len - 1; i++) big *= 2;
  long long cur = 0;
  for (i = 0; i < len; i++) {
    if (a[b[i]][cur] != 0) {
      cur = a[b[i]][cur];
      ans += big;
    } else {
      cur = a[1 - b[i]][cur];
    }
    big /= 2;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  long long i, j;
  vector<long long> a;
  a.push_back(0);
  for (i = 0; i < n; i++) {
    long long q;
    cin >> q;
    a.push_back(q);
  }
  a.push_back(0);
  add(0);
  vector<long long> pref(200500, 0);
  for (i = 1; i <= n; i++) {
    pref[i] = pref[i - 1] ^ a[i];
  }
  long long ans = 0;
  long long suff = 0;
  for (i = n; i >= 0; i--) {
    ans = max(ans, get_max(pref[i]));
    suff ^= a[i];
    add(suff);
  }
  cout << ans;
  return 0;
}
