#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[n], i, p = 0, e = 0, j, k, h = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    h = max(h, a[i]);
  }
  for (int i = 0; i < n; i++) {
    for (int j = i; j < n; j++) {
      for (int k = i; k <= j; k++) p = (p ^ a[k]);
      e = max(e, p);
      p = 0;
    }
  }
  cout << max(h, e);
  return 0;
}
