function Main(input){ 
var inputs =input.split(" ");
var N = parseInt(inputs[0],10);
var i = parseInt(inputs[1],10);
var answer = N-i+1;
console.log(answer);

}
  Main(require('fs').readFileSync('/dev/stdin','utf8'));