gets
arr = STDIN.gets.split.map(&:to_i)
MIN = -1000000
MAX =  1000000
min = arr.inject(MAX) do |cmin,i|
  if cmin < i then 
    cmin
  else 
    i
  end
end


max = arr.inject(MIN) do |cmax,i|
  if cmax > i then 
    cmax
  else 
    i
  end
end
sum = arr.inject(:+)
puts "#{max} #{min} #{sum}"