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