#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,b,x=0,y=0;;
    while(~scanf("%d%d",&a,&b))
    {
        x=a*b;
        y=(1*a+1*b)-1;
        printf("%d\n",x-y);
    }
    return 0;
}
