#include <bits/stdc++.h>
using namespace std;
int ncnt;
struct Node {
  Node *next[2];
} node[100100 * 60], *root;
void insert(long long x) {
  Node *tmp = root;
  for (int i = 59; i >= 0; i--) {
    int k = (x & (1ll << i)) ? 1 : 0;
    if (!tmp->next[k]) tmp->next[k] = &node[ncnt++];
    tmp = tmp->next[k];
  }
}
long long ask(long long x) {
  Node *tmp = root;
  long long ret = 0;
  for (int i = 59; i >= 0; i--) {
    int k = (x & (1ll << i)) ? 0 : 1;
    if (!tmp->next[k])
      k = k ^ 1;
    else
      ret |= 1ll << i;
    tmp = tmp->next[k];
  }
  return ret;
}
int n;
long long a[100100];
int main() {
  scanf("%d", &n);
  root = &node[ncnt++];
  for (int i = 0; i < n; i++) cin >> a[i];
  insert(a[0]);
  for (int i = 1; i < n; i++) {
    a[i] ^= a[i - 1];
    insert(a[i]);
  }
  long long tol = a[n - 1], ans = ask(tol);
  for (int i = 0; i < n; i++) ans = max(ans, ask(tol ^ a[i]));
  cout << ans << endl;
  return 0;
}
