package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func readf(sc *bufio.Scanner) float64 {
	f, err := strconv.ParseFloat(sc.Text(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

func alchemy(x, y float64) float64 {
	return (x + y) / 2
}

func Alchemy(list []float64) float64 {
	for i := range list {
		if i == len(list)-1 {
			continue
		}
		list[i+1] = alchemy(list[i], list[i+1])
	}
	return list[len(list)-1]
}

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())

	v := make([]float64, n)
	for i := range v {
		sc.Scan()
		v[i] = readf(sc)
	}

	max := 0.0
	perms := Permute(v)
	for _, perm := range perms {
		tmp := Alchemy(perm)
		if max < tmp {
			max = tmp
		}
	}

	fmt.Println(max)
}

func Permute(nums []float64) [][]float64 {
	n := factorial(len(nums))
	ret := make([][]float64, 0, n)
	permute(nums, &ret)
	return ret
}

func permute(nums []float64, ret *[][]float64) {
	*ret = append(*ret, makeCopy(nums))

	n := len(nums)
	p := make([]float64, n+1)
	for i := 0; i < n+1; i++ {
		p[i] = float64(i)
	}
	for i := 1; i < n; {
		p[i]--
		j := 0
		if i%2 == 1 {
			j = int(p[i])
		}

		nums[i], nums[j] = nums[j], nums[i]
		*ret = append(*ret, makeCopy(nums))
		for i = 1; p[i] == 0; i++ {
			p[i] = float64(i)
		}
	}
}

func factorial(n int) int {
	ret := 1
	for i := 2; i <= n; i++ {
		ret *= i
	}
	return ret
}

func makeCopy(nums []float64) []float64 {
	return append([]float64{}, nums...)
}
