#!/usr/bin/env python import statistics n = int(input().strip()) innums = [int(x) for x in input().split()] innums.sort() ans = statistics.median(innums) print(ans)