#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
long long MAX = 1e17;
long long a[100005];
struct Node {
  Node *left, *right;
  Node() {
    left = NULL;
    right = NULL;
  }
};
void insert(Node* root, long long curr) {
  for (long long i = 60ll; i >= 0; i--) {
    if (curr & (1ll << i)) {
      if (root->right == NULL) root->right = new Node();
      root = root->right;
    } else {
      if (root->left == NULL) root->left = new Node();
      root = root->left;
    }
  }
}
long long query(Node* root, long long curr) {
  long long ret = 0ll;
  for (long long i = 60ll; i >= 0; i--) {
    if (curr & (1ll << i)) {
      if (root->left != NULL)
        root = root->left, ret += (1ll << i);
      else
        root = root->right;
    } else {
      if (root->right != NULL)
        root = root->right, ret += (1ll << i);
      else
        root = root->left;
    }
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  ;
  int n;
  cin >> n;
  Node* root;
  root = new Node();
  for (int i = 0; i < n; i++) cin >> a[i + 1];
  long long curr = 0ll, ans = 0ll;
  insert(root, 0ll);
  for (int i = 0; i < n; i++) {
    curr ^= a[i + 1];
    insert(root, curr);
  }
  long long temp = curr;
  curr = 0ll;
  for (int i = 0; i < n + 2; i++) {
    ans = max(ans, query(root, curr ^ temp));
    curr ^= a[i];
  }
  cout << ans;
}
