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