n = gets.to_i x = gets.split.map(&:to_i) mean = x.sum / n.to_f x.each do |e| puts (50 - (mean - e) / 2).to_i end