import Control.Applicative() main :: IO () main = do _:_:xs <- map read . words <$> getContents :: IO [Int] print $ maximum xs - minimum xs