#include<cstdio>
int main()
    {
    long A,B;
    scanf("%ld%ld",&A,&B);
    printf("%ld",A*B-1);
    return 0;
}