import itertools as it
import numpy as np
from copy import deepcopy

def main():
    inputs = [input() for _ in range(2)]
    N = int(inputs[0])
    ingredients = [float(i) for i in inputs[1].split(' ')]

    combinations = [list(it.combinations(range(l), 2)) for l in range(2,len(ingredients)+1)]
    combinations.reverse()

    indexes = np.empty((np.prod([len(c) for c in combinations]), len(combinations)), dtype='i')
    for i, combination in enumerate(combinations):
        indexes[:,i] = np.array(list(range(len(combination))) * int(len(indexes)/len(combination)))

    best_ingredient = 0.
    for index in indexes:
        routs = []
        curr_ingredients = deepcopy(ingredients)
        for n,i in enumerate(index):
            routs.append(combinations[n][i])
        for rout in routs:
            new_ingredient = (curr_ingredients.pop(rout[1]) +
                            curr_ingredients.pop(rout[0])) / 2.
            curr_ingredients.append(new_ingredient)
        if best_ingredient < curr_ingredients[0]:
            best_ingredient = curr_ingredients[0]

    print(best_ingredient)


if __name__ == '__main__':
    main()