{-
	AOJ #2805
	@kankichi573
-}
main = do myline <- getContents
          let mylist = words myline
          let a = read ( head mylist) :: Int
          let b = read ( head $ tail mylist) :: Int
          print (a - b - 1)