import scala.io.StdIn
object Main extends App {
  def f(list: List[Double]): Double = {
    val value = list match {
      case List(a, b, c @ _*) => f(((a + b)/2.0) :: c.toList)
      case List(a, b) => (a + b)/2.0
      case List(a) => a.toDouble
    }
    value
  }
  val N = StdIn.readLine()
  val Vs = StdIn.readLine().split(" ").map(_.toDouble).toList
  println(Vs.permutations.toList.map(list => f(list)).max)
}
