import Control.Applicative
import Control.Monad
import Data.List
import Data.Array
import Data.Char

main = do
  arr <- sort . map (read::String -> Int) . words <$> getLine
  print $ arr !! 2 - arr !! 0
