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

main :: IO ()
main = do
    [a,b,c] <- sort . map (fst . fromJust . B.readInt) . B.words <$> B.getLine :: IO [Int]
    print $ (b - a) + (c - b)
    

