using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoder { class Program { static void Main(string[] args) { int[] numArray = new int[int.Parse(Console.ReadLine())]; string s = Console.ReadLine(); string[] t = s.Split(' '); for(int i = 0; i < t.Length; i++) { numArray[i] = int.Parse(t[i]); } Array.Sort(numArray); int j = numArray.Length; if(j % 2 == 0) { double tmp = numArray[j / 2]; tmp = (tmp + numArray[(j / 2) - 1]) / 2; Console.WriteLine("{0}", tmp); } else { Console.WriteLine(numArray[j / 2]); } //Console.ReadLine(); } } }