-- diverta 2019 A problem
import Control.Monad
import qualified Data.Text as T

-- conversion from String to Int
toInt :: String -> Int
toInt x = read x :: Int

-- obtain [Int] from I/O
getInts :: IO [Int]
getInts = do
  x <- getLine
  let y = (map $ toInt) $ words x
  return y

-- main function
main :: IO ()
main = do
  nk <- getInts
  let n = head nk
  let k = last nk
  print (n-k+1)