#include <bits/stdc++.h>
using namespace std;
int adj[5000000][2];
int b[60];
int BIT = 42;
void conv(long long x) {
  for (int i = 0; i < BIT; i++) b[i] = x % 2, x /= 2;
  reverse(b, b + BIT);
}
int V = 1;
void insert(long long x) {
  conv(x);
  int v = 0;
  for (int i = 0; i < BIT; i++) {
    if (adj[v][b[i]] == 0) adj[v][b[i]] = V++;
    v = adj[v][b[i]];
  }
}
long long query(long long x) {
  conv(x);
  int v = 0;
  long long ret = 0;
  for (int i = 0; i < BIT; i++) {
    if (adj[v][1 - b[i]] != 0) {
      ret += (1LL << (BIT - 1 - i));
      v = adj[v][1 - b[i]];
    } else
      v = adj[v][b[i]];
  }
  return ret;
}
long long a[1000000];
long long suf[1000000];
long long pre[1000000];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    pre[i] = a[i] ^ pre[i - 1];
  }
  for (int i = n; i >= 1; i--) suf[i] = a[i] ^ suf[i + 1];
  insert(0);
  long long ret = 0;
  for (int i = 1; i <= n; i++) {
    ret = max(ret, query(suf[i]));
    insert(pre[i]);
  }
  ret = max(ret, query(0));
  cout << ret << endl;
}
