using System; using System.Linq; using System.Collections.Generic; class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var input = Console.ReadLine().Split(' '); var list = new List(); int midIdx; foreach (var d in input) { list.Add(int.Parse(d)); } if (N % 2 == 0) { midIdx = N / 2; Console.WriteLine((list[midIdx-1] + list[midIdx]) / 2); } else { midIdx = N / 2; Console.WriteLine(list[midIdx]); } } }