import qualified Data.ByteString.Lazy.Char8 as B
import Data.Maybe

bsReadInts :: B.ByteString -> [Int]
bsReadInts = map (fst . fromJust . B.readInt) . B.words

----------------------------------------------------------------------

solve :: Int -> Int -> Int
solve n i = n - i + 1

tmain :: B.ByteString -> Int
tmain cont =
  let [n, i] = bsReadInts cont
  in solve n i

main = putStrLn . show . tmain =<< B.getContents
