#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long a[N];
struct node {
  node *left, *right;
};
node* getnode() {
  node* curr = new (node);
  curr->left = NULL;
  curr->right = NULL;
  return curr;
}
node* root;
void insert(long long x) {
  node* cur = root;
  for (int i = 41; i >= 0; i--) {
    long long t = ((1LL << i) & x);
    if (t) {
      if (cur->right == NULL) cur->right = getnode();
      cur = cur->right;
    } else {
      if (cur->left == NULL) cur->left = getnode();
      cur = cur->left;
    }
  }
}
long long check(long long x) {
  long long ans = 0;
  node* cur = root;
  for (int i = 41; i >= 0; i--) {
    long long t = ((1LL << i) & x);
    if (t) {
      if (cur->left)
        cur = cur->left;
      else
        cur = cur->right, ans |= (1LL << i);
    } else {
      if (cur->right)
        cur = cur->right, ans |= (1LL << i);
      else
        cur = cur->left;
    }
  }
  return ans;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  root = getnode();
  long long pre = 0;
  for (int i = 1; i <= n; i++) cin >> a[i], pre ^= a[i];
  long long post = a[n];
  long long maxi = pre;
  insert(0);
  for (int i = n - 1; i >= 0; i--) {
    insert(post);
    post ^= a[i];
    pre ^= a[i + 1];
    maxi = max(maxi, pre ^ check(pre));
  }
  cout << maxi;
  return 0;
}
