N = int(input()) A = list(map(int, input().split())) print(max([x^y for x in A for y in A]))