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