object Main extends App {
  import scala.io.StdIn.readLine
  import scala.io.StdIn.readInt
  
  	var n = readInt
  	val pros = readLine.split(" ").map(_.toLong).toList.sorted
  
  if(n % 2 == 0){
    //リストは0から始まることに注意
    n =(n / 2).toInt
  	println( (pros(n - 1) until pros(n)).length )
  }
  else println("0")
}
