import Control.Arrow main = do input <- getContents print . uncurry (-) <<< maximum &&& minimum <<< map read . drop 2 . lines $ input