{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import qualified Data.ByteString.Char8 as BC
import           Data.List             (sort)
import           Data.Maybe            (fromJust)

main :: IO ()
main = do
  [a, b, c] <- getInts
  print $ solve a b c

solve :: Int -> Int -> Int -> Int
solve a b c
  | even s    = s `div` 2
  | otherwise = s `div` 2 + 2
  where s = c' - a' + c' - b'
        [a', b', c'] = sort [a, b, c]

readInts :: BC.ByteString -> [Int]
readInts = map (fst . fromJust . BC.readInt) . BC.words

getInts :: IO [Int]
getInts = readInts <$> BC.getLine
