#include <bits/stdc++.h>
using namespace std;
int n;
long long a[110000] = {0};
long long S[110000] = {0};
multiset<long long> MU;
int d;
long long et = 0;
long long cs = 0;
long long ans = 0;
const int C = 40;
bool nfd;
multiset<long long>::iterator low, up;
int main(void) {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  S[n + 1] = 0;
  MU.insert(S[n + 1]);
  for (int i = n; i; i--) {
    S[i] = a[i] ^ S[i + 1];
    MU.insert(S[i]);
  }
  for (int i = 1; i <= n; i++) {
    et = 0;
    cs ^= a[i];
    for (d = 1; d <= C; d++) {
      et += (1ll << (C - d));
      low = MU.lower_bound(((cs >> (C - d)) << (C - d)) ^ et);
      up = MU.lower_bound((((cs >> (C - d)) << (C - d)) ^ et) +
                          (1ll << (C - d)));
      nfd = (low == up);
      if (nfd) et -= (1ll << (C - d));
    }
    if (et > ans) ans = et;
    MU.erase(S[i + 1]);
  }
  cout << ans << endl;
}
