import Data.List

main :: IO ()
main = sameIntegersDo

sameIntegers abcs
    | bRem == 0 && aRem == 0    = bN + aN
    | bRem == 1 && aRem == 1    = bN + aN + 1
    | otherwise                 = bN + aN + 2
    where
        [a,b,c] = sort abcs
        (bN, bRem) = (c - b) `divMod` 2
        (aN, aRem) = (c - a) `divMod` 2

sameIntegersDo = do
    abcs <- map read . words <$> getLine
    print $ sameIntegers abcs