#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
long long INF = 1e17 + 7;
struct node {
  long long sum = 0;
  struct node *a[3];
} * root;
void ad(long long x) {
  node *pos = root;
  for (int i = 42; i >= 0; i--) {
    long long bit = ((1LL << i) & x);
    if (bit) bit = 1;
    if (pos->a[bit] == NULL) pos->a[bit] = new node();
    pos = pos->a[bit];
    pos->sum++;
  }
}
long long ser(long long x) {
  node *pos = root;
  long long ret = 0;
  for (int i = 42; i >= 0; i--) {
    long long bit = ((1LL << i) & x);
    if (bit) bit = 1;
    if (pos->a[bit ^ 1] != NULL) {
      ret += (1LL << i);
      pos = pos->a[bit ^ 1];
    } else {
      if (pos->a[bit] == NULL) return ret;
      pos = pos->a[bit];
    }
  }
  return ret;
}
long long pr[100003];
long long su[100003];
long long num[100003];
int main() {
  root = new node();
  long long n;
  cin >> n;
  ad(0);
  for (int i = 0; i < n; i++) cin >> num[i];
  pr[0] = num[0];
  for (int i = 1; i < n; i++) pr[i] = (pr[i - 1] ^ num[i]);
  su[n - 1] = num[n - 1];
  for (int i = n - 2; i >= 0; i--) su[i] = (su[i + 1] ^ num[i]);
  long long ret = 0;
  for (int i = 0; i < n; i++) {
    ret = max(ret, pr[i]);
    ret = max(ret, ser(su[i]));
    ad(pr[i]);
  }
  cout << ret;
  return 0;
}
