'use strict';

const receive = () => require('fs').readFileSync('/dev/stdin', 'utf8').split(/\s/);

const main = input => {
  const N = Number(input[0]);
  const i = Number(input[1]);
  console.log(N - i + 1);
};

main(receive());
