main = getLine >>= print . manhattan . map read . words manhattan [x,y,d] | d > x+y = 0 | otherwise = d+1 - max 0 (d-x) - max 0 (d-y)