#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
const int maxn=10010;
int n;
long long v[maxn],w[maxn];
long long ans;
void cal(int x){
long long tmp=0;
for(int i=1;i<=x;i++){
if(v[i])tmp^=w[i];
ans=max(ans,tmp);
}
}
void dfs(int x){
if(x==n+1)return;
v[x]=1,cal(x),dfs(x+1);
v[x]=0,cal(x),dfs(x+1);
}
int main(){
freopen("xor_equ.in","r",stdin);
freopen("xor_equ.out","w",stdout);
scanf("%d",&n);
for(int i=1;i<=n;i++)scanf("%lld",&w[i]);
dfs(1);
printf("%lld",ans);
return 0;
}