// A - Train
// https://abc107.contest.atcoder.jp/tasks/abc107_a

import scala.io.StdIn.readLine

object Main extends App {

  val Array(n, i) = readLine.split(" ").map(_.toInt)

  val ans = n - i + 1
  println(ans)

}