#include<iostream>
using namespace std;
int main()
{
int m,n;
while(cin>>m>>n)
cout<<n*m-1<<endl;
return 0;
}