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