# frozen_string_literal: true class Array def solve combination(2).map { |a, b| a ^ b }.max end end N = gets.to_i A = gets.split.map(&:to_i) puts A.solve