import Data.List

solve :: [Int] -> Int
solve [a1, a2, a3] = task1 + task2
  where [task1, task2, task3] = sort [abs $ a1 - a2, abs $ a2 - a3, abs $ a3 - a1]

main :: IO ()
main = do
  tasks <- map read . words <$> getLine
  print $ solve tasks