toInt :: (String -> Int)
toInt x = read x ::Int
judgeTransferL :: Int -> Int -> Int -> Int
judgeTransferL a b c
  | (a - b)    <  c = c - (a - b)
  | (a - b)    >= c = 0

main = do
  args <- words <$> getLine
  putStrLn (show (judgeTransferL (map(toInt) args !! 0)
                                 (map(toInt) args !! 1)
                                 (map(toInt) args !! 2)))