#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int nums[100];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &nums[i]);
  }
  int r = 0;
  for (int i = 0; i < n; i++) {
    int a = nums[i];
    for (int j = i + 1; j < n; j++) {
      a = a ^ nums[j];
      int b = 0;
      if (j < n - 1) b = nums[j] ^ nums[j + 1];
      r = max(max(a, b), r);
    }
    r = max(max(a, r), nums[i]);
  }
  printf("%d\n", r);
  return 0;
}
