#include <bits/stdc++.h>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;


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