main = do cs <- getLine let [a, b, d] = map readInt $ words cs print $ length $ filter (\x -> d - x <= abs(b)) [0..abs(a)] readInt :: String -> Int readInt = read