#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 20;
int sz = 1;
int nd[maxn * 60][2];
long long int pxor[maxn], A[maxn];
void ins(long long int x) {
  int pos = 0;
  for (int i = 60; i >= 0; i--) {
    int tar = ((1ll << i) & x) ? 1 : 0;
    if (nd[pos][tar] == 0) {
      nd[pos][tar] = sz++;
    }
    pos = nd[pos][tar];
  }
}
long long int ans(long long int x) {
  int pos = 0;
  long long int res = 0;
  for (int i = 60; i >= 0; i--) {
    int tar = ((1ll << i) & x) ? 1 : 0;
    tar = 1 - tar;
    if (nd[pos][tar] != 0) {
      pos = nd[pos][tar];
      res += (1ll << i);
    } else {
      pos = nd[pos][1 - tar];
    }
  }
  return res;
}
long long int fans, X;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ins(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  pxor[n - 1] = A[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    pxor[i] = pxor[i + 1] ^ A[i];
  }
  for (int i = 0; i < n; i++) {
    X ^= A[i];
    fans = max(fans, ans(pxor[i]));
    ins(X);
  }
  fans = max(fans, ans(0));
  cout << fans;
  return 0;
}
