import Control.Monad
import Text.Printf
import Control.Applicative
import Data.List as L

main :: IO()
main = do
  [a, b, c] <- map read . words <$> getLine
  printf "%d\n" $ slv a b c

slv :: Int -> Int -> Int -> Int
slv a b c | even val = val `div` 2
          | otherwise = (val + 3) `div` 2
  where [aa, bb, cc] = L.sort [a, b, c]
        val = cc - aa + cc - bb