#include <bits/stdc++.h>
using namespace std;
long long int arr[100100], pre[100100], tir[100100], cnt;
struct node {
  struct node *l;
  struct node *r;
  int key;
} tree;
char word[100];
void insert(struct node *t, long long int k, int idx) {
  if (idx < 0) return;
  if (k & ((long long int)1 << idx)) {
    if (t->r == NULL) {
      t->r = new struct node;
      (t->r)->l = NULL;
      (t->r)->r = NULL;
      t->r->key = 1;
    }
    insert(t->r, k, idx - 1);
  } else {
    if (t->l == NULL) {
      t->l = new struct node;
      (t->l)->l = NULL;
      (t->l)->r = NULL;
      t->l->key = 0;
    }
    insert(t->l, k, idx - 1);
  }
}
long long int find(struct node *t, long long int k, long long int idx,
                   long long int ret) {
  if (idx < 0) return ret;
  if (k & ((long long int)1 << idx)) {
    if (t->l != NULL) {
      return find(t->l, k, idx - 1, ret);
    } else if (t->r != NULL) {
      return find(t->r, k, idx - 1, ret ^ ((long long int)1 << idx));
    }
  } else {
    if (t->r != NULL) {
      return find(t->r, k, idx - 1, ret ^ ((long long int)1 << idx));
    } else {
      return find(t->l, k, idx - 1, ret);
    }
  }
}
int main() {
  long long int n, ans;
  while (cin >> n) {
    pre[0] = tir[n] = 0;
    for (int i = 1; i <= n; i++) scanf("%I64d", &arr[i]);
    for (int i = 1; i <= n; i++) pre[i] = pre[i - 1] ^ arr[i];
    for (int i = n; i > 0; i--) tir[i] = tir[i + 1] ^ arr[i];
    tree.l = NULL;
    tree.r = NULL;
    tree.key = 0;
    ans = 0;
    insert(&tree, pre[0], 63);
    for (int i = 1; i <= n; i++) {
      insert(&tree, pre[i], 63);
      long long int temp = find(&tree, tir[i + 1], 63, 0);
      if ((temp ^ tir[i + 1]) > ans) ans = temp ^ tir[i + 1];
    }
    cout << ans << endl;
  }
  return 0;
}
