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