using System; using System.Collections.Generic; namespace ConsoleApp1 { class Program { static void Main(string[] args) { #if LocalDebug var exStdIn = new System.IO.StreamReader("stdin.txt"); System.Console.SetIn(exStdIn); #endif var Num = GetData(); var RowData = GetList(); List SortedData = new List(); foreach (var n in RowData) { SortedData.Add(int.Parse(n)); } SortedData.Sort(); if (SortedData.Count % 2 == 0) { decimal Output = (decimal)(SortedData[(SortedData.Count / 2) - 1] + SortedData[SortedData.Count / 2]) / 2; Console.WriteLine(Output); } else { var Output = SortedData[SortedData.Count / 2]; Console.WriteLine(Output); } #if LocalDebug System.Console.ReadKey(); #endif } static int GetData() { return int.Parse(Console.ReadLine()); } static string[] GetList() { return Console.ReadLine().Split(' '); } } }