import statistics as st N = int(input()) num_list = list(map(int,input().split())) print(st.median(num_list))