#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> tr;
int n;
int mx_bits = 40;
int ind = 0;
long long xor_sum = 0;
long long ans;
vector<long long> v;
void insert_tr(long long num) {
  int node = 0;
  for (int i = (int)mx_bits; i >= (int)0; --i) {
    bool bit = ((num >> i) & 1) > 0;
    if (tr[node][bit] == -1) {
      tr.push_back(vector<int>(2, -1));
      ++ind;
      tr[node][bit] = ind;
    }
    node = tr[node][bit];
  }
}
long long query_tr(long long num) {
  long long ret = 0;
  int node = 0;
  long long val = 1;
  for (int i = (int)mx_bits; i >= (int)0; --i) {
    bool bit = ((num >> i) & 1) > 0;
    if (tr[node][1 - bit] != -1) {
      ret += val << i;
      node = tr[node][1 - bit];
    } else
      node = tr[node][bit];
  }
  return ret;
}
void solve() {
  ans = xor_sum;
  long long cur = 0;
  insert_tr(cur);
  for (int i = (int)0; i < (int)n; ++i) {
    cur ^= v[i];
    insert_tr(cur);
    long long ret = query_tr(xor_sum ^ cur);
    ans = max(ans, ret);
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  tr.push_back(vector<int>(2, -1));
  cin >> n;
  v.resize(n);
  for (int i = (int)0; i < (int)n; ++i) {
    cin >> v[i];
    xor_sum = xor_sum ^ v[i];
  }
  solve();
  return 0;
}
