import Control.Applicative

solver :: Int -> Int -> Int -> Maybe Int
solver a f b =
  let s = b - a
  in
      if s <= 0
        then Just 0
        else
          if f >= s
            then Just s
            else
              Nothing

main :: IO()
main = do
  (a:f:b:_) <- map (read :: String -> Int) . words <$> getLine
  let ans = solver a f b
  maybe (putStrLn "NA") print ans