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