#pragma comment(linker, "/STACK:66777216") #pragma warning(disable : 4996) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #pragma hdrstop #include #ifdef _MSC_VER #include #else #define popcount(a) __builtin_popcount(a) #define clz(a) __builtin_clz(a) #define ctz(a) __builtin_ctz(a) #endif #ifdef _MSC_VER #endif template struct MakeVector { }; template struct MakeVector { /// caide keep template> static R make_vector(std::size_t size, const T& value) { return R(size, value); } }; #ifdef _MSC_VER #else #define LLD "%lld" #define LLU "%llu" #endif #define ll long long // namespace std #include using namespace std; void solve(std::istream& in, std::ostream& out) { ll n, m; in >> n >> m; out << (m - 1) + m * (n - 1) << endl; } #include int main() { srand(time(NULL)); ios_base::sync_with_stdio(0); cin.tie(0); istream& in = cin; ostream& out = cout; out << fixed << setprecision(16); solve(in, out); return 0; }