#include <bits/stdc++.h>
using namespace std;
const int N = 100100, LG = 40;
int n;
long long a[N];
struct node {
  int lx = 0, rx = 0;
} trie[N * (LG + 5)];
int root[N];
int last;
void push(int x, int x0, long long v) {
  for (int j = LG; j >= 0; j--) {
    long long b = (1ll << j);
    if (v & b) {
      trie[x].rx = ++last;
      if (x0 != 0) {
        trie[x].lx = trie[x0].lx;
        x0 = trie[x0].rx;
      } else
        trie[x].lx = 0;
      x = last;
    } else {
      trie[x].lx = ++last;
      if (x0 != 0) {
        trie[x].rx = trie[x0].rx;
        x0 = trie[x0].lx;
      } else
        trie[x].rx = 0;
      x = last;
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  root[n + 1] = 1;
  last = 1;
  push(1, 0, 0);
  for (long long x = 0, i = n; i >= 1; i--) {
    x ^= a[i];
    root[i] = ++last;
    push(root[i], root[i + 1], x);
  }
  long long z = 0, ans = 0;
  a[0] = 0;
  for (int i = 0; i <= n; i++) {
    z ^= a[i];
    int it = root[i + 1];
    long long temp = 0;
    for (int j = LG; j >= 0; j--) {
      long long b = (1ll << j);
      if (z & b) {
        if (trie[it].lx != 0) {
          it = trie[it].lx;
          temp |= b;
        } else {
          it = trie[it].rx;
        }
      } else {
        if (trie[it].rx != 0) {
          it = trie[it].rx;
          temp |= b;
        } else {
          it = trie[it].lx;
        }
      }
    }
    ans = max(ans, temp);
  }
  cout << ans << '\n';
  return 0;
}
