#include using namespace std; int main() { long n,m; cin>>n>>m; long newn,newm; if(n>m){ newn=m; newm=n; } else{ newn=n; newm=m; } cout<<(newn-1)+(newn*(newm-1))<