inputs = STDIN.readlines.map(&:chomp) n = inputs[0].to_i as = inputs[1].split(/\s+/).map(&:to_i) def median(n, as) sorted = as.sort if n % 2 == 0 (sorted[n / 2 - 1] + sorted[n / 2]) / 2.0 else sorted[(n - 1) / 2] end end puts "%.1f" % median(n, as)