# include using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; const ll maxn = (ll)5e5; const ll linf = (ll)1e17; ll n, m; int main(){ cin >> n >> m; cout << n * m - 1; return 0; }