#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long a[100005];
vector<long long> val[100005];
vector<long long> fuck[100005];
long long bencho[100005];
long long pre[100005];
struct vertex {
  long long nxt[2];
  vertex() {
    nxt[0] = -1;
    nxt[1] = -1;
  }
  bool leaf = false;
};
vector<vertex> bit(1);
void add(long long ver) {
  long long z = 0;
  for (auto i : val[ver]) {
    if (bit[z].nxt[i] == -1) {
      bit[z].nxt[i] = bit.size();
      bit.emplace_back();
    }
    z = bit[z].nxt[i];
  }
}
long long find(long long ver) {
  long long z = 0;
  vector<long long> ans;
  for (auto i : fuck[ver]) {
    if (bit[z].nxt[(i ^ 1)] == -1) {
      if (bit[z].nxt[i] == -1) {
        break;
      } else {
        z = bit[z].nxt[i];
        ans.push_back(0);
      }
    } else {
      z = bit[z].nxt[(i ^ 1)];
      ans.push_back(1);
    }
  }
  long long res = 0, p = (1LL << 39);
  for (auto i : ans) {
    res += i * p;
    p /= 2;
  }
  return res;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long mx = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i <= n + 1; i++) {
    if (i > 0) bencho[i] = (bencho[i - 1] ^ a[i]);
    long long z = bencho[i];
    for (long long j = 0; j < 40; j++) {
      fuck[i].push_back(z % 2);
      z /= 2;
    }
    reverse(fuck[i].begin(), fuck[i].end());
  }
  for (long long i = n + 1; i >= 0; i--) {
    pre[i] = (pre[i + 1] ^ a[i]);
    long long z = pre[i];
    for (long long j = 0; j < 40; j++) {
      val[i].push_back(z % 2);
      z /= 2;
    }
    reverse(val[i].begin(), val[i].end());
  }
  for (long long i = n + 1; i > 0; i--) {
    add(i);
    mx = max(mx, find(i - 1));
  }
  cout << mx;
  clock_t clk;
  clk = clock();
  clk = clock() - clk;
  cerr << fixed << setprecision(6) << "Time: " << ((double)clk) / CLOCKS_PER_SEC
       << "\n";
  return 0;
}
