#include <bits/stdc++.h>
const int kMaxN = 100005;
int N;
long long A[kMaxN];
long long xorA = 0;
long long power[60];
long long now = 0, ans = 0;
struct Node {
  Node *child[2];
  Node() {
    child[0] = NULL;
    child[1] = NULL;
  }
};
void clean(Node *root) {
  if (root == NULL) return;
  clean(root->child[0]);
  clean(root->child[1]);
  delete root;
}
Node *xAroot, *AxAroot;
void init() {
  power[0] = 1;
  for (int i = 1; i < 60; ++i) {
    power[i] = power[i - 1] << 1;
  }
  std::cin >> N;
  for (int i = 0; i < N; ++i) {
    std::cin >> A[i];
    xorA = xorA ^ A[i];
  }
  xAroot = new Node;
  AxAroot = new Node;
}
void Insert(Node *root, long long value) {
  for (int i = 50; i >= 0; --i) {
    int bit = (value & power[i]) > 0;
    if (root->child[bit] == NULL) {
      root->child[bit] = new Node;
    }
    root = root->child[bit];
  }
}
void DFS(int d, Node *xAnode, Node *AxAnode) {
  bool one = false;
  if (d < 0) {
    if (now > ans) {
      ans = now;
    }
    return;
  }
  if ((now | (power[d + 1] - 1)) <= ans) {
    return;
  }
  if (xAnode->child[0] && AxAnode->child[1]) {
    now = now | power[d];
    one = true;
    DFS(d - 1, xAnode->child[0], AxAnode->child[1]);
    now = now & (~power[d]);
  }
  if (xAnode->child[1] != NULL && AxAnode->child[0] != NULL) {
    one = true;
    now = now | power[d];
    DFS(d - 1, xAnode->child[1], AxAnode->child[0]);
    now = now & ~power[d];
  }
  if (!one && xAnode->child[0] && AxAnode->child[0]) {
    DFS(d - 1, xAnode->child[0], AxAnode->child[0]);
  }
  if (!one && xAnode->child[1] && AxAnode->child[1]) {
    DFS(d - 1, xAnode->child[1], AxAnode->child[1]);
  }
}
int solve() {
  init();
  long long xA = 0, AxA = xorA;
  Insert(xAroot, 0);
  Insert(AxAroot, xorA);
  for (int i = 0; i < N; ++i) {
    xA = xA ^ A[i];
    Insert(xAroot, xA);
    AxA = AxA ^ A[i];
    Insert(AxAroot, AxA);
  }
  DFS(50, xAroot, AxAroot);
  std::cout << ans << std::endl;
  clean(xAroot);
  clean(AxAroot);
  return 0;
}
int main(int argc, char *argv[]) {
  solve();
  return 0;
}
