import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [a1,a2,a3] <- getIntList
    print . sum . take 2 . sort $ map abs [a1-a2,a2-a3,a3-a1]