import Data.List

main ::IO()
main = do
    lis <- map read.words <$> getLine ::IO [Int]
    let list = sort lis
    --putStrLn $ unwords $ map show (sort list)
    print ((list!!2 - list!!1)+(list!!1 - list!!0))