#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2, LG = 63;
int n;
long long A[N];
int nxt[N * LG][2], t = 1;
void add(long long num) {
  int i = 0;
  for (int x = LG - 1; x >= 0; x--) {
    int b = (num & (1LL << x)) != 0LL;
    if (!nxt[i][b]) nxt[i][b] = t++;
    i = nxt[i][b];
  }
}
long long query(long long num) {
  int i = 0;
  long long ans = 0;
  for (int x = LG - 1; x >= 0; x--) {
    int b = (num & (1LL << x)) != 0LL;
    b = !b;
    if (nxt[i][b]) {
      i = nxt[i][b];
      ans += 1LL << x;
    } else {
      i = nxt[i][!b];
    }
  }
  return ans;
}
int main() {
  cin >> n;
  for (int x = 0, qwert = n; x < qwert; x++)
    cin >> A[x], A[x] ^= x ? A[x - 1] : 0;
  A[n] = A[n - 1];
  add(0);
  long long ans = 0;
  for (int x = 0, qwert = n + 1; x < qwert; x++) {
    ans = max(ans, query(A[n - 1] ^ (x ? A[x - 1] : 0)));
    add(A[x]);
  }
  cout << ans << "\n";
}
