#include <bits/stdc++.h>
using namespace std;
void setmax(long long &a, const long long &b) {
  if (a < b) a = b;
}
struct node {
  node *children[2];
  bool value;
  int depth;
  node(const bool &b = false, const int &d = 43) {
    children[0] = NULL;
    children[1] = NULL;
    value = b;
    depth = d;
  }
} t;
void insert(node *root, long long s) {
  int i = root->depth - 1;
  while (i >= 0) {
    bool mod = (s >> i) & 1ll;
    if (!(root->children[mod])) break;
    root = root->children[mod];
    i--;
  }
  while (i >= 0) {
    bool mod = (s >> i) & 1ll;
    root->children[mod] = new node(mod, i);
    root = root->children[mod];
    i--;
  }
}
long long maxval(node *root, long long s) {
  long long retval = 0;
  for (;;) {
    retval += ((long long)root->value) << root->depth;
    if (!(root->depth)) return retval;
    int newdepth = root->depth - 1;
    bool bestind = !((s >> newdepth) & 1);
    if (root->children[bestind])
      root = root->children[bestind];
    else if (root->children[!bestind])
      root = root->children[!bestind];
  }
}
int N;
long long arr[100003];
long long partxor[100003], suffixor;
long long ans;
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) {
    scanf("%I64d", &arr[i]);
    partxor[i] = partxor[i - 1] ^ arr[i];
  }
  insert(&t, 0LL);
  for (int i = N; i; i--) {
    suffixor ^= arr[i];
    insert(&t, suffixor);
    long long x = maxval(&t, partxor[i - 1]);
    setmax(ans, x ^ partxor[i - 1]);
  }
  setmax(ans, partxor[N]);
  printf("%I64d\n", ans);
  return 0;
}
