n = int(input()) *a, = map(int,input().split()) a.sort() print(a[n//2] if n%2 else (a[n//2]+a[n//2-1])/2)