#include <bits/stdc++.h>
using namespace std;
int trie[64 * 100005][2], uni;
inline long long int bin_to_int(vector<long long int> vt) {
  long long int ans = 0, hudai = 1;
  while (vt.size()) {
    ans += (hudai * vt[vt.size() - 1]);
    hudai *= 2;
    vt.pop_back();
  }
  return ans;
}
inline vector<long long int> int_to_bin(long long int n) {
  vector<long long int> ans(64), tem;
  while (n > 0) {
    tem.push_back(n % 2);
    n /= 2;
  }
  for (int i = 0; i < (tem.size()); i++) {
    ans[63 - i] = tem[i];
  }
  return ans;
}
inline long long int search(vector<long long int> vt) {
  int cur = 1;
  vector<long long int> ans;
  for (int i = 0; i < (64); i++) {
    int id = (vt[i] + 1) % 2;
    if (trie[cur][id]) {
      ans.push_back(1);
      cur = trie[cur][id];
    } else {
      ans.push_back(0);
      cur = trie[cur][vt[i]];
    }
  }
  return bin_to_int(ans);
}
inline void insert(vector<long long int> vt) {
  int cur = 1;
  for (int i = 0; i < (64); i++) {
    int id = vt[i];
    if (!trie[cur][id]) trie[cur][id] = ++uni;
    cur = trie[cur][id];
  }
  return;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<long long int> vt;
  uni = 1;
  for (int i = 0; i < (n); i++) {
    long long int xx;
    scanf("%lld", &xx);
    vt.push_back(xx);
  }
  vector<long long int> hudai;
  hudai.push_back(0);
  vt.push_back(0);
  for (int i = 0; i < (n); i++)
    hudai.push_back(hudai[hudai.size() - 1] ^ vt[i]);
  long long int maximum = 0;
  long long int xr = 0;
  for (int i = hudai.size() - 1; i >= 0; i--) {
    long long int xx = hudai[i];
    xr = xr ^ vt[i];
    vector<long long int> tem = int_to_bin(xr);
    insert(tem);
    tem = int_to_bin(xx);
    maximum = max(maximum, search(tem));
  }
  printf("%lld\n", maximum);
  return 0;
}
