n = gets.to_i array = gets.split(' ').map(&:to_i).sort if n % 2 == 1 puts array[(n / 2).round ] else puts array[n / 2] + array[n / 2 + 1] end