# -*- coding: utf-8 -*-

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}"