#!/usr/bin/env python
# -*- coding: utf-8 -*-

import itertools
import sys
input = sys.stdin.readline


def func(i):
    ans = list()
    for a in itertools.combinations(i, 2):
        ans.append(
            [(a[0] + a[1]) / 2] + [j for j in i if j not in [a[0], a[1]]])

    return ans


def main():
    n = int(input())
    v = list()

    for i in map(int, input().split()):
        v.append(i)

    v = [v]

    ans = list()
    for i in v:
        if len(i) != 1:
            new = func(i)

            if len(new[0]) == 1:
                ans += new
            else:
                # 新たにできた具材のセットを足す
                v += new

    print(max(ans)[0])


if __name__ == '__main__':
    main()
