#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
using namespace std;
vector<long long> s[66];
long long t[65]={1};
long long x[10010]={0};
long long n,ans;
long long work1(int r,long long m)
{
if (r==n+1)
return
ans=max(ans,m);
else
{
work1(r+1,m^x[r]);
work1(r+1,m);
}
}
/*long long work2()
{
sort(x+1,x+n+1);
t[0]=1;
for (int i=1;i<=64;i++)
t[i]=t[i-1]*2;
for (int i=1;i<=n;i++)
{
if ()
}
}*/
int main()
{
freopen("xor_equ.in","r",stdin);
freopen("xor_equ.out","w",stdout);
typedef long long ll;
ans=ll(0);
scanf("%d",&n);
for (int i=1;i<=n;i++)
scanf("%lld",&x[i]);
work1(1,ll(0));
/*if (n<=20)
else work2();*/
printf("%lld",ans);
}