#include <bits/stdc++.h>
using namespace std;
int n;
long long a[100005];
int trie[4000005][2];
int sz[4000005];
int cur = 1;
void add(long long x) {
  int v = 1;
  for (int i = 40; i >= 0; i--) {
    sz[v]++;
    bool edge = ((1LL << i) & x);
    if (trie[v][edge] == 0) {
      cur++;
      trie[v][edge] = cur;
      v = cur;
    } else
      v = trie[v][edge];
  }
}
void d(long long x) {
  int v = 1;
  for (int i = 40; i >= 0; i--) {
    sz[v]--;
    bool edge = (x & (1LL << i));
    int e = edge;
    int next = trie[v][e];
    if (sz[next] == 1) {
      sz[next] = 0;
      trie[v][e] = 0;
      break;
    } else
      v = next;
  }
}
long long query(long long x) {
  long long temp = 0;
  int v = 1;
  for (int i = 40; i >= 0; i--) {
    bool edge = ((1LL << i) & x);
    if (edge) {
      if (trie[v][0] != 0) {
        temp += (1LL << i);
        v = trie[v][0];
      } else
        v = trie[v][1];
    } else {
      if (trie[v][1] != 0) {
        temp += (1LL << i);
        v = trie[v][1];
      } else
        v = trie[v][0];
    }
  }
  return temp;
}
long long ans = 0;
int main() {
  scanf("%d", &n);
  add(0);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &a[i]);
    a[i] ^= a[i - 1];
    add(a[i]);
  }
  ans = max(ans, query(0));
  for (int i = n; i >= 1; i--) {
    d(a[i]);
    ans = max(ans, query(a[n] ^ a[i - 1]));
  }
  printf("%I64d\n", ans);
  return 0;
}
