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