#include <bits/stdc++.h>
using namespace std;
struct bor {
  int next[3];
  long long el;
} b[100100 * 66];
int n;
long long a[111111], x[111111], ans, cur, cnt = 1;
inline void add(long long x) {
  cur = 1;
  for (int i = 60; i >= 0; i--) {
    int bit = (x & (1ull << i)) > 0;
    if (!b[cur].next[bit]) {
      cnt++;
      b[cur].next[bit] = cnt;
    }
    cur = b[cur].next[bit];
  }
  b[cur].el = x;
}
inline long long find(long long x) {
  cur = 1;
  for (int i = 60; i >= 0; i--) {
    int bit = (x & (1ull << i)) > 0;
    if (b[cur].next[bit ^ 1])
      cur = b[cur].next[bit ^ 1];
    else
      cur = b[cur].next[bit];
  }
  return b[cur].el;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  for (int i = 1; i <= n; i++) x[i] = x[i - 1] ^ a[i];
  ans = x[n];
  for (int i = 1; i <= n - 1; i++) ans = max(ans, max(x[i], x[n] ^ x[i]));
  for (int i = 1; i <= n - 1; i++) {
    add(x[i]);
    long long xx = find(x[n] ^ x[i]);
    ans = max(ans, x[n] ^ x[i] ^ xx);
  }
  printf("%I64d\n", ans);
  return 0;
}
