#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
const int mod = 1000000007;
int ch[maxn * 50][2];
int sz;
int CD;
long long a[maxn];
int ID[128];
void init() {
  CD = 2;
  ID['0'] = 0;
  ID['1'] = 1;
  sz = 1;
}
void Insert(char *s) {
  int p = 0;
  for (; *s; s++) {
    int id = ID[*s];
    if (!ch[p][id]) {
      ch[p][id] = sz++;
    }
    p = ch[p][id];
  }
}
void Gao(long long num) {
  char s[100];
  int tot = 0;
  for (; num; num /= 2) s[tot++] = num % 2 + '0';
  while (tot < 50) s[tot++] = '0';
  s[tot] = 0;
  reverse(s, s + tot);
  Insert(s);
}
string Find(char *s) {
  string ans = "";
  int p = 0;
  for (; *s; s++) {
    int f = *s - '0';
    if (ch[p][!f]) {
      p = ch[p][!f];
      ans += (!f) + '0';
    } else {
      p = ch[p][f];
      ans += f + '0';
    }
  }
  return ans;
}
long long Get(long long num) {
  char s[100];
  int tot = 0;
  for (; num; num /= 2) s[tot++] = num % 2 + '0';
  while (tot < 50) s[tot++] = '0';
  s[tot] = 0;
  reverse(s, s + tot);
  string ans = Find(s);
  long long ret = 0;
  for (int i = 0; i < ans.length(); i++) {
    ret = ret * 2 + ans[i] - '0';
  }
  return ret;
}
int main() {
  init();
  int n, i;
  scanf("%d", &n);
  long long s = 0, ans = 0;
  for (i = 1; i <= n; i++) {
    scanf("%I64d", &a[i]);
    s ^= a[i];
    if (s > ans) ans = s;
    Gao(s);
  }
  s = 0;
  for (i = n; i >= 1; i--) {
    s ^= a[i];
    if (s > ans) ans = s;
    long long tmp = Get(s);
    ans = max(ans, s ^ tmp);
  }
  printf("%I64d\n", ans);
  return 0;
}
