#include <stdio.h>
int main()
{
int c, i;
scanf("%d", &c);
scanf("%d", &i);
printf("%d",c*(i-1)+1);
printf("\n");
return 0;

}
