#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141592653589793;
const long double DEL = 1e-10;
const int mod = 1000000007;
inline void read(long long &x) {
  long long c = getchar();
  x = 0;
  long long neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) {
    x = -x;
  }
}
long long fpow(long long x, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) {
      res = res * x % mod;
    }
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
void sieve(long long n) {
  bool prime[1000006];
  memset(prime, true, sizeof(prime));
  long long rootn = (long long)sqrt(n);
  for (long long p = 2; p <= rootn; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) {
        prime[i] = false;
      }
    }
  }
  prime[1] = 0;
}
const long long N = 100050;
long long cnt, sum, mid, mx, mn, ans, a[N], b[N];
long long n, m, d, i, j, k, l, p, q, r, t, w, x, y, z;
bool f, f1, f2;
string s;
struct node {
  vector<long long> p = {0, 0};
};
vector<node> trie;
void insert(long long x) {
  long long curr = 1;
  for (long long i = 40; i >= 0; i--) {
    long long bit = ((x >> i) & 1);
    if (!trie[curr].p[bit]) {
      trie[curr].p[bit] = trie.size();
      trie.emplace_back();
    }
    curr = trie[curr].p[bit];
  }
}
long long findbest(long long x) {
  long long ans = 0, curr = 1;
  for (long long i = 40; i >= 0; i--) {
    long long bit = ((x >> i) & 1LL);
    if (trie[curr].p[bit ^ 1]) {
      curr = trie[curr].p[bit ^ 1];
      ans |= (1LL << i);
    } else {
      curr = trie[curr].p[bit];
    }
  }
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    l ^= a[i];
  }
  trie.emplace_back();
  trie.emplace_back();
  for (i = n; i > 0; i--) {
    insert(r);
    ans = max(ans, findbest(l));
    r ^= a[i];
    l ^= a[i];
  }
  cout << max(ans, findbest(l));
}
