#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 */  
    unsigned long long n,m,p;
    cin>>n>>m;
    p=n*m-1;
    cout<<p;
    return 0;
}