using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); string[] strA = Console.ReadLine().Split(' '); int[] A = new int[strA.Length]; double m = 0; for (int i = 0; i < strA.Length; i++) { A[i] = int.Parse(strA[i]); } Array.Sort(A); if (N % 2 == 0) { m = (double)(A[N / 2 - 1] + A[N / 2]) / 2; } else { m = A[N / 2]; } Console.WriteLine(m); } } }