gets
arr = gets.split.map(&:to_i)
MIN = arr.inject(1000000) do |cmin, i|
  cmin < i ? cmin : i
end

MAX = arr.inject(-1000000) do |cmax, i|
  cmax > i ? cmax : i
end

SUM = arr.inject(&:+)

puts "#{MIN} #{MAX} #{SUM}"