n = int(input()) a = list(map(int, input().split())) def quick_sort(data): if len(data) <= 1: return data pivot = data.pop(0) left = [i for i in data if i <= pivot] right = [i for i in data if i > pivot] left = quick_sort(left) right = quick_sort(right) return left + [pivot] + right a = quick_sort(a) if n % 2 == 0: mid = (int)(n / 2) print((a[mid] + a[mid-1]) / 2) else: mid = (int)((n - 1) / 2) print((a[mid]))