import Control.Applicative ((<$>))
import Data.List (sort)

main :: IO ()
main = solve <$> map read <$> words <$> getLine >>= print

solve :: [Int] -> Int
solve [a1, a2, a3] = sum . take 2 . sort $ [abs (a1 - a2), abs (a2 - a3) , abs (a3 - a1)]
