#include<cstdio>
#include<vector>
#include<algorithm>
#include<iostream>
#include<cstring>
#include<queue>
#include<cmath>
using namespace std;
long long c[10010];
int n;
long long a[10010];
int lowbit(int x)
{
return x&-x;
}
void add(int x,int k)
{
while (x<=n)
{
c[x]^=k;
x+=lowbit(x);
}
}
int sum(int x)
{
int s=0;
while (x>0)
{
s^=c[x];
x-=lowbit(x);
}
return s;
}
int main()
{
freopen("xor_equ.in","r",stdin);
freopen("xor_equ.out","w",stdout);
cin>>n;
for (int i=1;i<=n;i++)
cin>>a[i],add(i,a[i]);
long long ans=-1;
for (int i=1;i<=n;i++)
for (int j=0;j+i<=n;j++)
{
long long k=sum(i+j)^sum(i);
ans=max(ans,k);
}
for (int i=1;i<=n/2;i++)
for (int j=0;j+i<=n/2;j++)
for (int l=n/2+1;l<=n;l++)
for (int r=0;r+l<=n;r++)
{
long long k=sum(i+j)^sum(i)^sum(l+r)^sum(l);
ans=max(ans,k);
}
cout<<ans;
return 0;
}