#include <bits/stdc++.h>
using namespace std;
struct _ {
  _() { ios_base::sync_with_stdio(0); }
} _;
template <class T>
void PV(T a, T b) {
  while (a != b) cout << *a++, cout << (a != b ? " " : "\n");
}
template <class T>
inline bool chmin(T& a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
inline bool chmax(T& a, T b) {
  return a < b ? a = b, 1 : 0;
}
const int inf = 0x3f3f3f3f;
const int mod = int(1e9) + 7;
const int N = 111111;
int n;
long long d[N];
long long s[N];
string toString(long long first) {
  string r;
  while (first > 0) {
    r += '0' + first % 2;
    first /= 2;
  }
  r.resize(42, '0');
  reverse((r).begin(), (r).end());
  return r;
}
string binary[N];
int L[4 * 42 * N], R[4 * 42 * N], pnt;
string sn;
void add(int depth, string& ss, int c) {
  if (depth == 42) return;
  if (ss[depth] == '0') {
    if (L[c] == -1) L[c] = ++pnt;
    add(depth + 1, ss, L[c]);
  } else {
    if (R[c] == -1) R[c] = ++pnt;
    add(depth + 1, ss, R[c]);
  }
}
void query(int depth, string& ss, int c, long long& mx) {
  if (depth == 42) return;
  if (ss[depth] == sn[depth]) {
    if (R[c] != -1)
      query(depth + 1, ss, R[c], mx = 2 * mx + 1);
    else
      query(depth + 1, ss, L[c], mx = 2 * mx);
  } else {
    if (L[c] != -1)
      query(depth + 1, ss, L[c], mx = 2 * mx + 1);
    else
      query(depth + 1, ss, R[c], mx = 2 * mx);
  }
}
int main() {
  cin >> n;
  memset(L, -1, sizeof(L));
  ;
  memset(R, -1, sizeof(R));
  ;
  binary[0] = toString(0);
  add(0, binary[0], 0);
  for (int i = 0; i < n; i++) {
    cin >> d[i];
    s[i + 1] = s[i] ^ d[i];
    binary[i + 1] = toString(s[i + 1]);
    add(0, binary[i + 1], 0);
  }
  sn = binary[n];
  long long res = 0;
  for (int i = 0; i <= n; i++) {
    long long mx = 0;
    query(0, binary[i], 0, mx);
    chmax(res, mx);
  }
  cout << res << endl;
  return 0;
}
