qsort [] = []
qsort (x:xs) = (qsort [s | s <- xs, s < x]) ++ [x] ++ (qsort [g | g <- xs, g >= x])

main = do
  input <- getLine
  let tasks = qsort $ map read (words input) :: [Int]
  print $ (tasks !! 1 - tasks !! 0) + (tasks !! 2 - tasks !! 1)
