#include <bits/stdc++.h>
using namespace std;
int n, tr[6000010][2], tot;
long long a[100011];
void add(long long x) {
  int p = 1;
  for (int i = 60; i >= 0; i--) {
    int tmp = ((1ll << i) & x) ? 1 : 0;
    if (!tr[p][tmp]) tr[p][tmp] = ++tot;
    p = tr[p][tmp];
  }
}
long long query(long long x) {
  int p = 1;
  long long ans = 0;
  for (int i = 60; i >= 0; i--) {
    int tmp = ((1ll << i) & x) ? 0 : 1;
    if (!tr[p][tmp])
      tmp ^= 1;
    else
      ans += 1ll << i;
    p = tr[p][tmp];
  }
  return ans;
}
int main() {
  tot = 1;
  long long ans = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]), a[i] ^= a[i - 1];
  for (int i = 1; i <= n + 1; i++) {
    long long x = a[n] ^ a[i - 1];
    add(a[i - 1]);
    ans = max(ans, query(x));
  }
  printf("%lld", ans);
}
