#include <bits/stdc++.h>

#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("03")

#define frpn		freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define mm(x) 		memset(x, 0, sizeof(x))
#define all(x)		(x).begin(), (x).end()
#define rs(x) 		((x) << 1 | 1)
#define ls(x) 		((x) << 1)
#define pb			push_back
#define int			long long
#define sz			size()
#define S 			second
#define F 			first

using namespace std;

const int N = 1e5;

int intx () {
	int x;
	cin >> x;
	return x;
}

void solve() {
	int h, w;
	cin >> h >> w;
	int ans = h * w;
	if (h == 1) cout << (w - 1) + (((w - 1) * w) / 2) + w;
	else {
	while (1) {
			h--;
			if (h == -1) break;
			ans += h * w;
			ans += (w - 1) + (((w - 1) * w) / 2);
			if(h != 1) ans += w;
		}
		cout << ans;
	}
}

signed main () {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int t = 1;
//	cin >> t;
	while (t--) {
		solve();
	}

	return 0;
}

