#include <bits/stdc++.h>
using namespace std;
long long Set(long long N, int pos) { return N = N | (1LL << pos); }
long long reset(long long N, int pos) { return N = N & ~(1LL << pos); }
bool check(long long N, int pos) { return (bool)(N & (1LL << pos)); }
struct node {
  bool endmark;
  node *next[2];
  node() {
    endmark = 0;
    for (int i = 0; i < 2; i++) next[i] = NULL;
  }
} * root;
void insert(long long m) {
  node *cur = root;
  for (int i = 63; i >= 0; i--) {
    int id = check(m, i);
    if (cur->next[id] == NULL) cur->next[id] = new node();
    cur = cur->next[id];
  }
  cur->endmark = true;
}
long long query(long long m) {
  node *cur = root;
  long long ret = 0;
  for (int i = 63; i >= 0; i--) {
    int id = check(m, i);
    int a = 1 - id;
    if (cur->next[a] != NULL) {
      ret = Set(ret, i);
      cur = cur->next[a];
    } else
      cur = cur->next[id];
  }
  return ret;
}
long long ara[100005], lft[100005], rgt[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  root = new node();
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> ara[i];
  for (int i = 1; i <= n; i++) lft[i] = lft[i - 1] ^ ara[i];
  for (int i = n; i >= 1; i--) rgt[i] = rgt[i + 1] ^ ara[i];
  long long ans = 0;
  insert(0);
  for (int i = 1; i <= n; i++) {
    long long temp = query(rgt[i]);
    ans = max(ans, temp);
    insert(lft[i]);
  }
  ans = max(ans, query(0));
  cout << ans << endl;
  return 0;
}
