#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
using ll = long long;


ll calc(ll h, ll w) {
	if (h > w) swap(h, w);
	if (w == 1) return 0;
	ll m = w / 2;
	return calc(h, m) + calc(h, w - m) + h * w;
}

int main () {
	ll a, b;
	cin >> a >> b;
	cout << calc(a, b) + a * b;
}