N = gets.to_i A = gets.split.map(&:to_i) ans = 0 A.combination(2).each do |a, b| v = a ^ b ans = v if ans < v end puts ans