gets A = gets.split.map &:to_i puts A.inject(0) { |a, b| a + b / 2 } - A.max / 2 + A.max