{-# LANGUAGE OverloadedLists #-}

import Prelude hiding
  ( maximum
  , minimum )
import Data.Vector

main :: IO ()
main = print . solve . fmap read . words
  =<< getLine

solve :: Vector Int -> Int
solve = (-) <$> maximum <*> minimum
