#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 5;
long long arr[mx];
struct node {
  node *ch[2];
  node() {
    ch[0] = NULL;
    ch[1] = NULL;
  }
} * root;
void insert(long long x) {
  node *cur = root;
  for (int i = 40; i >= 0; i--) {
    int bit = (x >> i) & 1;
    if (cur->ch[bit] == NULL) cur->ch[bit] = new node();
    cur = cur->ch[bit];
  }
}
long long query(long long x) {
  node *cur = root;
  long long res = 0;
  for (int i = 40; i >= 0; i--) {
    int bit = (x >> i) & 1;
    if (cur->ch[bit ^ 1]) {
      cur = cur->ch[bit ^ 1];
      res += (1LL << i);
    } else
      cur = cur->ch[bit];
  }
  return res;
}
int main() {
  int n;
  long long pre = 0, suf = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%I64d", &arr[i]), pre ^= arr[i];
  root = new node();
  insert(0);
  long long ans = 0;
  for (int i = n - 1; i >= 0; i--) {
    ans = max(ans, query(pre));
    pre ^= arr[i];
    suf ^= arr[i];
    insert(suf);
  }
  ans = max(ans, query(pre));
  printf("%I64d\n", ans);
  return 0;
}
