N=int(input()) L=list(map(int,input().split())) ans=0 for i in range(N): for j in range(i+1,N): ans=max(ans,L[i]^L[j]) print(ans)