import scala.io.StdIn
object Main extends App {
  def avg(a: Double, b: Double): Double = { (a + b)/2.0 }
  val N = StdIn.readLine()
  val Vs = StdIn.readLine().split(" ").map(_.toDouble).toList
  println(Vs.permutations.toList.map(list => list.tail.foldRight(list.head)(avg)).max)
}
