#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const double eps = 1e-12;
const int inf = 200000000;
const long long int infLL = 2e18;
long long int MOD = 1000000007;
int MOD1 = 1000000007;
int MOD2 = 1000000009;
inline bool checkBit(long long int n, long long int i) {
  return n & (1LL << i);
}
inline long long int setBit(long long int n, long long int i) {
  return n | (1LL << i);
  ;
}
inline long long int resetBit(long long int n, long long int i) {
  return n & (~(1LL << i));
}
void yes() { cout << "YES" << '\n'; }
void no() { cout << "NO" << '\n'; }
int dx[] = {0, 0, +1, -1};
int dy[] = {+1, -1, 0, 0};
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
inline bool isLeapYear(long long int year) {
  return (year % 400 == 0) || (year % 4 == 0 && year % 100 != 0);
}
inline void normal(long long int &a) {
  a %= MOD;
  (a < 0) && (a += MOD);
}
inline long long int modMul(long long int a, long long int b) {
  a %= MOD, b %= MOD;
  normal(a), normal(b);
  return (a * b) % MOD;
}
inline long long int modAdd(long long int a, long long int b) {
  a %= MOD, b %= MOD;
  normal(a), normal(b);
  return (a + b) % MOD;
}
inline long long int modSub(long long int a, long long int b) {
  a %= MOD, b %= MOD;
  normal(a), normal(b);
  a -= b;
  normal(a);
  return a;
}
inline long long int modPow(long long int b, long long int p) {
  long long int r = 1LL;
  while (p) {
    if (p & 1) r = modMul(r, b);
    b = modMul(b, b);
    p >>= 1LL;
  }
  return r;
}
inline long long int modDiv(long long int a, long long int b) {
  return modMul(a, modPow(b, MOD - 2));
}
const int MAX = 100005;
long long int pref[MAX], a[MAX], suf[MAX];
const int MAXN = 5000005;
long long int sz;
int nxt[2][2][MAXN];
int endd[MAXN];
int created[2][MAXN];
void insrt(long long int num, int tp) {
  long long int ptr = 0, c;
  for (long long int i = 50; i >= 0; --i) {
    c = checkBit(num, i);
    if (!created[tp][nxt[tp][c][ptr]]) {
      nxt[tp][c][ptr] = ++sz;
      created[tp][sz] = true;
    }
    ptr = nxt[tp][c][ptr];
  }
}
long long int func(long long int num, int tp) {
  long long int ptr = 0, c, ret = 0LL;
  for (long long int i = 50; i >= 0; --i) {
    c = 1 - checkBit(num, i);
    if (created[tp][nxt[tp][c][ptr]]) {
      ret += (1LL << i);
      ptr = nxt[tp][c][ptr];
    } else
      ptr = nxt[tp][1 - c][ptr];
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int i, maxi = 0LL, n;
  cin >> n;
  for (i = 1; i <= n; ++i) cin >> a[i];
  sz = 0;
  insrt(0LL, 0LL);
  for (i = 1; i <= n; ++i) pref[i] = pref[i - 1] ^ a[i];
  for (i = n; i >= 1; --i) suf[i] = suf[i + 1] ^ a[i];
  for (i = 1; i <= n; ++i) {
    insrt(pref[i], 0);
    maxi = max(maxi, func(suf[i + 1], 0));
  }
  sz = 0;
  insrt(0LL, 1LL);
  for (i = n; i >= 1; --i) {
    insrt(suf[i], 1);
    maxi = max(maxi, func(pref[i - 1], 1));
  }
  cout << maxi << '\n';
  return 0;
}
