#include <bits/stdc++.h>
using namespace std;
long long one = 1;
struct node {
  int count;
  node *left, *right;
  node() : count(0), left(NULL), right(NULL) {}
};
void insert(node *root, long long x, int level, int add) {
  if (!root) {
    return;
  }
  for (int shift = level; shift >= 0; shift--) {
    if (x & (one << shift)) {
      if (!root->right) {
        root->right = new node();
      }
      root->right->count += add;
      root = root->right;
    } else {
      if (!root->left) {
        root->left = new node();
      }
      root->left->count += add;
      root = root->left;
    }
  }
}
long long maxXor(node *root, long long x, int level) {
  if (level < 0) {
    return 0;
  }
  if (!root) {
    return 0;
  }
  long long ans = 0;
  for (int shift = level; shift >= 0; shift--) {
    if (x & (one << shift)) {
      if (root->left && root->left->count > 0) {
        ans += (one << shift);
        root = root->left;
      } else {
        root = root->right;
      }
    } else {
      if (root->right && root->right->count > 0) {
        ans += (one << shift);
        root = root->right;
      } else {
        root = root->left;
      }
    }
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
  }
  node *trie = new node();
  long long suffix = 0, ans = 0;
  insert(trie, suffix, 40, 1);
  for (int i = n - 1; i >= 0; i--) {
    suffix = suffix ^ vec[i];
    insert(trie, suffix, 40, 1);
    if (ans < suffix) {
      ans = suffix;
    }
  }
  long long prefix = 0, temp;
  for (int i = 0; i < n; i++) {
    prefix = prefix ^ vec[i];
    insert(trie, suffix, 40, -1);
    suffix = suffix ^ vec[i];
    temp = maxXor(trie, prefix, 40);
    if (temp > ans) {
      ans = temp;
    }
  }
  cout << ans;
  return 0;
}
