#include <iostream>

int main()

{
    int c,i,z;
    scanf("%d %d",&c,&i);
    z=(c*i)-c+1;
    printf("%d",z);
    return 0;
}
