gets a = gets.split.map(&:to_i).sort if a.size % 2 == 0 then puts (a[a.size / 2 - 1] + a[a.size / 2]) / 2.0 else puts a[a.size / 2].to_f end