main = do
    [a1, a2, a3] <- map read . words <$> getLine
    let ans = foldl1 min $ [abs (a1 - a2) + abs (a2 - a3), abs (a1 - a2) + abs (a1 - a3), abs (a1 - a3) + abs (a2 - a3)]
    putStrLn $ show ans
