gets x=gets.split.map(&:to_f).sort n=x.size p (x[n/2]+x[~-n/2])/2