#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
long long arr[maxn];
long long pref[maxn];
long long suff[maxn];
int tri[40 * maxn][2];
int cnt = 2;
void insert(long long A) {
  int cur = 1;
  for (int i = 39; i >= 0; i--) {
    long long curBit = ((A >> i) & 1);
    if (!tri[cur][curBit]) {
      tri[cur][curBit] = cnt;
      ++cnt;
    }
    cur = tri[cur][curBit];
  }
}
long long query(long long val) {
  int cur = 1;
  long long ans = 0;
  for (int i = 39; i >= 0; --i) {
    int curBit = ((val >> i) & 1);
    if (tri[cur][!curBit]) {
      ans += (1LL << i);
      cur = tri[cur][!curBit];
    } else {
      cur = tri[cur][curBit];
    }
  }
  return ans;
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  pref[0] = 0;
  suff[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    pref[i] = (pref[i - 1] ^ arr[i]);
  }
  for (int i = n; i >= 1; --i) {
    suff[i] = (suff[i + 1] ^ arr[i]);
  }
  insert(0);
  long long ans = query(pref[n]);
  ans = max(ans, pref[n]);
  for (int i = n - 1; i >= 0; --i) {
    insert(suff[i + 1]);
    ans = max(ans, query(pref[i]));
  }
  cout << ans;
}
