using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

public class Alchemist{
    public static void Main(){
        int N = int.Parse(Console.ReadLine());
        var foods = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
        var min = new int[2];
        for(int i=1;i<N;i++){
            foods = foods.OrderBy(x => x).ToList();
            min[0] = foods[0];
            foods.RemoveAt(0);
            min[1] = foods[0];
            foods.RemoveAt(0);
            foods.Add((int)min.Average());
        }
        Console.WriteLine(foods[0]);
    }
}