num = gets.to_i arr = gets.split.map(&:to_i).sort if num % 2 == 1 puts arr[num/2] else middle = (arr[num/2-1]+arr[num/2])/2 puts middle end