import Control.Applicative
readDigits = map read <$> words <$> getLine :: IO [Int]

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

main = do
    _ <- getLine
    putStrLn . unwords . map show . solve =<< readDigits 
