#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;


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