n = gets.chomp.to_i m = gets.chomp.split.map(&:to_f) m.sort! p m[n/2] if n % 2 != 0 p (m[n/2] + m[n/2-1]) /2 if n % 2 == 0