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


int main() {
    long long n,m;
    cin >> n >> m;
    cout << n*m-1 << endl;
    /* Enter your code here. Read input from STDIN. Print output to STDOUT */   
    return 0;
}