import Control.Applicative

main = do 
	getLine
	xs <- toIntList <$> getLine
	putStrLn . unwords $ map (show . ($ xs)) [minimum, maximum, sum]

toIntList :: String -> [Integer]
toIntList = map read . words
