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

int main() {
    long long int n,m,ans;
    scanf("%lld%lld",&n,&m);
    ans = n*m -1;
    printf("%lld",ans);
    /* Enter your code here. Read input from STDIN. Print output to STDOUT */    
    return 0;
}