'use strict';

const main = (input) => {
    const lines = input.split('\n');
    const data = lines[0].split(' ');
    const N = parseInt(data[0], 10);
    const i = parseInt(data[1], 10);
    const r = N - i + 1;
    console.log(r);
};

const isTest = false;

if (isTest) {
    main('4 2');
    main('1 1');
    main('15 11');
} else {
    main(require('fs').readFileSync('/dev/stdin', 'utf8'));
}