-- Computation - Min, Max and Sum

import Control.Applicative

main :: IO ()
main = do
  _  <- getLine
  ns <- map read . words <$> getLine
  (putStrLn . unwords . map show . calc) ns

calc :: [Int] -> [Int]
calc ns = [minimum ns, maximum ns, sum ns]

