using System;
class Program
{
	static void Main(string[] args)
	{
      int a = int.Parse(Console.ReadLine());
      string b = Console.ReadLine();
      double max = -0.0;
      string[] array = new string[a];
      double c = 0.0;
      for(int i = 0; i < array.Length;i++)
      {
        array = b.Split(' ');
        for(int j = 0; j < array.Length; j++)
        {
          if(i != j)
          {
            c = (int.Parse(array[i]) + int.Parse(array[j])) / 2;
            if(max < c)
            {
              max = c;
            }
          }
        }
      }
      Console.Write(max.ToString());
	}
}