#include <bits/stdc++.h>
using namespace std;
long long b[1 << 22][2], n, m = 1, a[100100], t, v;
void ad(long long x, long long y = 1ll << 40, long long u = 0) {
  if (y) {
    long long& p = b[u][(x & y) > 0];
    ad(x, y >> 1, p ? p : (p = m++));
  }
}
long long qr(long long x, long long y = 1ll << 40, long long u = 0) {
  bool d = !(x & y);
  return y ? (b[u][d] ? (y | qr(x, y >> 1, b[u][d])) : qr(x, y >> 1, b[u][!d]))
           : 0;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n && cin >> a[i]; ++i) ad(a[i] ^= a[i - 1]);
  for (int i = 0; i <= n; ++i)
    if ((v = qr(a[n] ^ a[i])) > t) t = v;
  cout << t << endl;
}
