#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T ABS(T a) {
  return a > 0 ? a : -a;
}
template <typename T>
inline T MIN(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
inline T MAX(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
inline T CHKMIN(T &a, T b) {
  if (a > b) a = b;
  return a;
}
template <typename T>
inline T CHKMAX(T &a, T b) {
  if (a < b) a = b;
  return a;
}
template <typename T>
inline void SWAP(T &a, T &b) {
  static T c;
  c = a;
  a = b;
  b = c;
}
template <typename T, typename... T0>
T MAX(T a, T b, T0... c) {
  return a > b ? MAX(a, c...) : MAX(b, c...);
}
template <typename T, typename... T0>
T MIN(T a, T b, T0... c) {
  return a < b ? MIN(a, c...) : MIN(b, c...);
}
template <typename T, int n>
void myin(T a[]) {
  for (int i = (0); i < (int)(n); ++i) cin >> a[i];
}
template <typename T>
void myin(T &a) {
  cin >> a;
}
template <typename T>
void print(T a) {
  cout << a << ' ';
}
template <typename T, typename... T0>
void print(T a, T0... b) {
  print(a);
  print(b...);
}
template <typename T>
void println(T a) {
  cout << a << endl;
}
template <typename T, typename... T0>
void println(T a, T0... b) {
  print(a);
  println(b...);
}
struct Node {
  Node *c[2];
} pool[5000000];
int psz = 0;
Node *newNode() {
  pool[psz].c[0] = pool[psz].c[1] = 0;
  return pool + psz++;
}
void insert(Node *p, long long x) {
  int len = 41;
  while (len >= 0) {
    int t = (x >> len) & 1;
    if (!p->c[t]) p->c[t] = newNode();
    p = p->c[t];
    --len;
  }
}
long long qu(Node *p, long long x) {
  static const long long ONE = 1;
  int len = 41;
  long long ret = 0;
  while (len >= 0) {
    long long t = (x >> len) & 1;
    t ^= 1;
    if (p->c[t]) {
      ret |= (ONE << len);
      p = p->c[t];
    } else {
      p = p->c[1 - t];
    }
    --len;
  }
  return ret;
}
Node *root;
int n;
long long in[120000], ans;
int main() {
  while (cin >> n) {
    in[0] = psz = ans = 0;
    root = newNode();
    for (int i = (1); i < (int)(n + 1); ++i) cin >> in[i];
    insert(root, 0);
    for (int i = (1); i < (int)(n + 1); ++i) {
      in[i] ^= in[i - 1];
      insert(root, in[i]);
    }
    for (int i = (1); i < (int)(n + 1); ++i) {
      CHKMAX(ans, qu(root, in[i] ^ in[n]));
    }
    println(ans);
  }
  return 0;
}
