import java.math.BigDecimal
import kotlin.comparisons.compareBy

fun main(args: Array<String>) {
    readLine()
    var matelials = readLine()!!.split(" ").map { it.toInt() }.sorted()
        .map { Material(BigDecimal(it)) }.toMutableList()

    while (matelials.size > 1) {
        val a = matelials[0]
        val b = matelials[1]
        val c = a.mix(b)
        matelials.add(c)
        matelials = matelials
            .subList(2, matelials.size)
            .sortedWith(compareBy { it.value })
            .toMutableList()
    }

    print(matelials[0].value)
}

val two = BigDecimal(2)

data class Material(val value: BigDecimal) {
    fun mix(other: Material): Material {
        return Material(
            this.value.add(other.value).divide(two)
        )
    }
}
