import math.Ordering.Double.IeeeOrdering
object Main extends App {
  val in = new java.util.Scanner(System.in)
  val N = in.nextInt
  val ABs = Array.fill(N)((in.nextDouble, in.nextDouble))
  val As = ABs.map(_._1).sorted
  val Bs = ABs.map(_._2).sorted
  val size = ABs.size
  val odd = size % 2 == 1

  def median(ar: Array[Double]): Double =
    if (odd) ar(size / 2)
    else (ar((size - 1) / 2) + ar(size / 2)) / 2

  println(((median(Bs) - median(As)) * (if (odd) 1 else 2)).toInt + 1)
}