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] + p[m/2+1]) /2 if n % 2 == 0