#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {-1, 1, 0, 0};
template <class T>
T power(T N, T P) {
  return (P == 0) ? 1 : N * power(N, P - 1);
}
template <class T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
void make_unique(vector<int>& a) {
  sort(a.begin(), a.end());
  a.erase(unique(a.begin(), a.end()), a.end());
}
int on(int n, int pos) { return n = n | (1 << pos); }
void off(int& n, int pos) { n = n & ~(1 << pos); }
bool check(int n, int pos) { return (bool)(n & (1 << pos)); }
const int N = 1e5 + 10;
const int M = 64;
int id, cnt[M * N], a[N * M][5];
int new_node() {
  for (int i = 0; i < 3; i++) {
    a[id][i] = -1;
  }
  cnt[id] = 0;
  return id++;
}
vector<int> bit(70);
void make(long long int x) {
  bit.clear();
  int i = 0;
  while (x) {
    bit.push_back(x % 2);
    x /= 2LL;
    i++;
  }
  while (i < M - 1) {
    bit.push_back(0LL);
    i++;
  }
  reverse(bit.begin(), bit.end());
}
void add(long long int x) {
  make(x);
  int cur = 0, typ;
  for (int i = 0; i < M; i++) {
    typ = bit[i];
    if (a[cur][typ] == -1) {
      a[cur][typ] = new_node();
    }
    cur = a[cur][typ];
    ++cnt[cur];
  }
}
void del(long long int x) {
  make(x);
  int cur = 0, typ;
  for (int i = 0; i < M; i++) {
    typ = bit[i];
    cur = a[cur][typ];
    --cnt[cur];
  }
}
long long int query(long long int x) {
  make(x);
  int cur = 0, typ;
  long long int ans = 0LL;
  for (int i = 0; i < M; i++) {
    typ = bit[i];
    if (cnt[a[cur][!typ]] > 0) {
      ans += (1LL << (M - i - 2));
      cur = a[cur][!typ];
    } else {
      if (a[cur][typ] == -1) return ans;
      cur = a[cur][typ];
    }
  }
  return ans;
}
long long int arr[N];
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    id = 0;
    new_node();
    for (__typeof(n) i = 1; i <= n; i++) {
      scanf("%lld", &arr[i]);
    }
    long long int xr = 0LL;
    for (int i = n; i >= 1; i--) {
      xr ^= arr[i];
      add(xr);
    }
    long long int mx = 0LL;
    long long int nw = 0LL;
    mx = max(mx, query(nw));
    for (int i = 1; i <= n; i++) {
      nw ^= arr[i];
      mx = max(mx, query(nw));
      del(xr);
      xr ^= arr[i];
    }
    printf("%lld\n", mx);
  }
  return 0;
}
