#include #include #include #include #include using namespace std; #define ll long long int int main() { ll n,m; cin>>n>>m; cout<<(n-1)+(m-1)*n<