N,*A=$<.map &:to_i p$.<3?"assert":A.combination(2).map{|a,b|a+b}.uniq.sort[-2]