import Data.List
import Control.Monad

main = do
  [a, b, c] <- map read . words <$> getLine
  print $ solve a b c

solve a b c =
  let
    [x, y, z] = sort [a, b, c]
    v1 = (y - x) `div` 2
    v2 = if odd (y - x) then 2 else 0
    v3 = z - y
  in
    v1 + v2 + v3