#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 123;
const long long INF = (long long)1e18 + 123;
const int inf = (int)1e9 + 123;
const int MOD = (int)1e9 + 7;
int n;
long long a[N];
long long pref[N], suff[N];
struct bor {
  int to[3];
  bor() { memset(to, -1, sizeof to); }
};
vector<bor> t;
bor new_bor() {
  bor tmp;
  return tmp;
}
int bit[60];
int cnt[N * 70];
int MAX_BIT = 40;
void add(long long x) {
  memset(bit, 0, sizeof bit);
  int ptr = 0;
  while (x > 0) {
    bit[ptr] = (x & 1);
    x >>= 1ll, ptr++;
  }
  int now = 0;
  cnt[now]++;
  for (int i = MAX_BIT; i >= 0; i--) {
    if (t[now].to[bit[i]] == -1) {
      t[now].to[bit[i]] = (int)(t.size());
      t.push_back(new_bor());
    }
    cnt[t[now].to[bit[i]]]++;
    now = t[now].to[bit[i]];
  }
}
void del(long long x) {
  memset(bit, 0, sizeof bit);
  int ptr = 0;
  while (x > 0) {
    bit[ptr] = (x & 1);
    x >>= 1ll, ptr++;
  }
  int now = 0;
  cnt[now]--;
  for (int i = MAX_BIT; i >= 0; i--) {
    int go = t[now].to[bit[i]];
    cnt[go]--;
    now = go;
  }
}
long long get(long long x) {
  memset(bit, 0, sizeof bit);
  int ptr = 0;
  while (x > 0) {
    bit[ptr] = (x & 1);
    x >>= 1ll, ptr++;
  }
  int now = 0;
  long long res = 0;
  for (int i = MAX_BIT; i >= 0; i--) {
    int go1 = t[now].to[(bit[i] ^ 1)], go2 = t[now].to[bit[i]];
    if (t[now].to[(bit[i] ^ 1)] != -1 && cnt[t[now].to[(bit[i] ^ 1)]] > 0) {
      res += (1ll << i);
      now = go1;
    } else {
      now = go2;
    }
    if (now == -1) exit(0);
  }
  return res;
}
int main() {
  t.push_back(new_bor());
  unsigned int FOR;
  asm("rdtsc" : "=A"(FOR));
  srand(FOR);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) pref[i] = (pref[i - 1] ^ a[i]);
  for (int i = n; i >= 1; i--) suff[i] = (suff[i + 1] ^ a[i]);
  for (int i = n + 1; i >= 1; i--) {
    add(suff[i]);
  }
  long long mx = 0;
  for (int i = 0; i <= n; i++) {
    if (i > 0) del(suff[i]);
    mx = max(mx, get(pref[i]));
  }
  cout << mx;
  return 0;
}
