# -*- coding: utf-8 -*- import statistics n = int(input()) a = list(map(int,input().split())) print(statistics.median(a))