#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
const int len = 40;
int n;
long long a[N], l[N], r[N], res;
int tr[N * 41][2], cnt;
void add(long long x) {
  int cur = 1;
  for (int i = len; i >= 0; i--) {
    int b = (x >> i) & 1;
    if (tr[cur][b] == 0) tr[cur][b] = ++cnt;
    cur = tr[cur][b];
  }
}
long long get(long long x) {
  int cur = 1;
  for (int i = len; i >= 0; i--) {
    int b = (x >> i) & 1;
    if (tr[cur][1 - b] != 0) {
      cur = tr[cur][1 - b];
      x = x | (1LL << i);
    } else {
      cur = tr[cur][b];
      x = x & (~(1LL << i));
    }
  }
  return x;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  for (int i = 1; i <= n; i++) {
    l[i] = l[i - 1] ^ a[i];
    r[n - i + 1] = r[n - i + 2] ^ a[n - i + 1];
  }
  cnt = 1;
  add(0);
  for (int i = 1; i <= n + 1; i++) {
    long long x = get(r[i]);
    res = max(res, x);
    add(l[i]);
  }
  cout << res;
}
