from itertools import combinations n=int(input()) a=[*map(int,input().split())] ans=0 for i,j in combinations(a,2): ans=max(ans,i^j) print(ans)