using System; public class Program{ public static void Main(){ string s = Console.ReadLine(); string[] input = Console.ReadLine().Split(' '); double[] array = new double[input.Length]; double answer = 0; for(int i = 0; i < input.Length; i++) { array[i] = double.Parse(input[i]); } Array.Sort(array); //偶数の時 if(array.Length % 2 == 0) { answer = (array[array.Length / 2] + array[(array.Length / 2) - 1]) / 2; } else { answer = array[array.Length / 2]; } Console.WriteLine(answer); } }