gets;p$<.map{|e|e.split.map &:to_i}.transpose.map(&:sum).min+1