import Control.Applicative

main :: IO ()
main = do
    [a, b] <- map read . words <$> getLine
    putStrLn $ show (solve a b)

solve :: Int -> Int -> Int
solve a b = if even (a + b) then (a + b) `div` 2 else (a + b) `div` 2 + 1