#include <stdio.h>
int main()
{
	int C,b,I;
	//C=broj clanaka b=broj citata I=i faktor//
	scanf("%d",&C);
	scanf("%d",&I);
	printf("%d",b=C*(I-1)+1);
	return 0;
}
