main :: IO ()
main = do
  [a,b,c] <- readParams
  print $ solve a b c

readParams :: Read a => IO [a]
readParams = map read . words <$> getLine

solve :: Int -> Int -> Int -> Int
solve a b c = c - amount
  where amount = min (a - b) c
