#include<bits/stdc++.h>
using namespace std;

inline int read(){
	int x=0,f=1;char ch;
	for(ch=getchar();!isdigit(ch);ch=getchar())if(ch=='-')f=-1;
	for(;isdigit(ch);ch=getchar())x=(x<<3)+(x<<1)+ch-'0';
	return x*f;
}

int main(){
	int n=read(),i=read();
	printf("%d\n",n-i+1);
	return 0;
}