length = gets.to_i

ary = gets.split(' ').map(&:to_i).sort

count = 0

center = (length / 2).to_i

(ary[center - 1]..ary[center + 1]).to_a.each do |d|
  arc = ary.select { |a| a >= d }
  count += 1 if arc.length == (ary - arc).length
end

puts count
