package Yukicoder /** * Created by hichikawa on 2015/11/02. */ fun main(args: Array) { fun readLineIntArray() : List { val str = readLine() as String val arrStr = str.split(" ") val ret = arrStr.map { it.toInt() } return ret } fun readLineInt() : Int { val str = readLine() as String return str.toInt() } val num = readLineInt() val numList = readLineIntArray().sorted() if(num % 2 == 1) { println(numList[num/2]) } else { println((numList[num/2-1].toDouble() + numList[num/2].toDouble())/2) } }