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

main :: IO ()
main = readLine >>= print . solve . sort 

solve :: [Int] -> Int 
solve [a, b, c] = ar + br + m
    where
        (ar, am) = (c - a) `divMod` 2
        (br, bm) = (c - b) `divMod` 2 
        dm = min am bm
        m 
            | am == bm = am
            | otherwise = dm + 2

readLine :: IO [Int]
readLine = unfoldr (\s -> second (maybe B.empty snd . B.uncons) <$> B.readInt s) <$> B.getLine

readContents :: Int -> IO [[Int]]
readContents = flip replicateM readLine