#include <bits/stdc++.h>
using namespace std;
unsigned long long int prefix[100005];
unsigned long long int a[100005];
struct node {
  struct node *l;
  struct node *r;
};
struct node *root = NULL;
void ins(unsigned long long int num) {
  node *cur = root;
  for (int i = 40; i >= 0; i--) {
    unsigned long long int bit = num & (1LL << i);
    if (bit)
      bit = 1;
    else
      bit = 0;
    if (bit) {
      if (cur->r != NULL)
        cur = cur->r;
      else {
        cur->r = new node();
        cur->r->l = NULL;
        cur->r->r = NULL;
        cur = cur->r;
      }
    } else {
      if (cur->l != NULL)
        cur = cur->l;
      else {
        cur->l = new node();
        cur->l->l = NULL;
        cur->l->r = NULL;
        cur = cur->l;
      }
    }
  }
}
unsigned long long int bestMatch(unsigned long long int num) {
  num = ~num;
  unsigned long long int ret = 0;
  node *cur = root;
  for (int i = 40; i >= 0; i--) {
    unsigned long long int bit = num & (1LL << i);
    if (bit)
      bit = 1;
    else
      bit = 0;
    if (bit) {
      if (cur->r != NULL) {
        cur = cur->r;
        ret += (1LL << i);
      } else
        cur = cur->l;
    } else {
      if (cur->l != NULL) {
        cur = cur->l;
      } else {
        cur = cur->r;
        ret += (1LL << i);
      }
    }
  }
  return ret;
}
int main() {
  int n;
  scanf("%d", &n);
  unsigned long long int ret = 0;
  root = new node();
  root->l = NULL;
  root->r = NULL;
  ins(0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0)
      prefix[i] = a[i];
    else
      prefix[i] = prefix[i - 1] ^ a[i];
  }
  unsigned long long int suffix = prefix[n - 1];
  for (int i = 0; i < n; i++) {
    suffix ^= a[i];
    ins(prefix[i]);
    ret = max(ret, bestMatch(suffix) ^ suffix);
  }
  cout << ret << "\n";
  return 0;
}
