#include <bits/stdc++.h>
#pragma GCC optimize "03"
using namespace std;
const long long int N = 1e5 + 5;
const long long int B = 44;
const long long int mod = 1e9 + 7;
const long long int inf = 1e9 + 9;
struct trie {
  long long int z, o, v;
} t[40 * N];
long long int a[N], c = 1;
void merge(long long int nd) {
  long long int p = 0;
  if (t[nd].o != 0) p += t[t[nd].o].v;
  if (t[nd].z != 0) p += t[t[nd].z].v;
  t[nd].v = p;
}
void add(long long int nd, long long int x, long long int b) {
  if (b == -1) {
    t[nd].v++;
    return;
  }
  bool p = (x & (1LL << b));
  if (p) {
    if (t[nd].o == 0) t[nd].o = ++c;
    add(t[nd].o, x - (1LL << b), b - 1);
  } else {
    if (t[nd].z == 0) t[nd].z = ++c;
    add(t[nd].z, x, b - 1);
  }
  merge(nd);
}
void del(long long int nd, long long int x, long long int b) {
  if (b == -1) {
    t[nd].v--;
    return;
  }
  bool p = (x & (1LL << b));
  if (p)
    del(t[nd].o, x - (1LL << b), b - 1);
  else
    add(t[nd].z, x, b - 1);
  merge(nd);
}
long long int query(long long int nd, long long int x, long long int b) {
  if (b == -1) return 0;
  long long int ans = 0;
  bool p = (x & (1LL << b));
  if (p) {
    if (t[nd].z != 0)
      ans = (1LL << b) + query(t[nd].z, x - (1LL << b), b - 1);
    else
      ans = query(t[nd].o, x - (1LL << b), b - 1);
  } else {
    if (t[nd].o != 0)
      ans = (1LL << b) + query(t[nd].o, x, b - 1);
    else
      ans = query(t[nd].z, x, b - 1);
  }
  return ans;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  add(1, 0, B - 1);
  for (long long int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i] = (a[i] ^ a[i - 1]);
    add(1, a[i], B - 1);
  }
  long long int ans = query(1, 0, B - 1);
  for (long long int i = n; i >= 1; i--) {
    del(1, a[i], B - 1);
    a[i] = (a[i] ^ a[i - 1]);
    a[i] = (a[i] ^ a[i + 1]);
    ans = max(ans, query(1, a[i], B - 1));
  }
  cout << ans << '\n';
  return 0;
}
