import java.util.Scanner object Problem275 { def main(args: Array[String]) { val sc = new Scanner(System.in) val n = sc.nextInt() val a = Seq.fill(n)(sc.nextInt()).sorted val result: Double = if (n % 2 == 0) { (a(n / 2 - 1) + a(n / 2)).toDouble / 2 } else { a(n / 2) } println(result) } }