import statistics as st N = int(input()) A = input().split() A = [int(i) for i in A] print(st.median(A))