<?php

function dfs($first, $last) {
    if (count($last) === 0) {
        return [$first];
    }

    $tmp = [];
    foreach ($last as $key => $val) {
        $nf = $first;
        $lf = $last;

        $nf[] = $val;
        array_splice($lf, $key, 1);
        $tmp = array_merge($tmp, dfs($nf, $lf));
    }

    return $tmp;
}

function next_permutation($start, $end) {
    return dfs([], range($start, $end));
}


fscanf(STDIN, "%d", $n);
$V = array_map('intval', explode(' ',  trim(fgets(STDIN))));

$perm = next_permutation(1, $n);

$max_val = 0;
foreach ($perm as $arr) {
    $tmp = ($V[$arr[0] - 1] + $V[$arr[1] - 1]) / 2;
    for ($i = 2; $i < $n; ++$i) {
        $tmp = ($tmp + $V[$arr[$i] - 1]) / 2;
    }

    $max_val = max($max_val, $tmp);
}

echo $max_val;
