#include #include #include #include #include using namespace std; int count1; void squares(int t); int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ long long n, m; cin >> n >> m; cout<<(n-1)+((m-1)*(n)); return 0; }